From 0a06c10e2995dadc1793fd5b24e9d7bf8237808e Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Thu, 10 Jul 2025 19:18:07 +0900 Subject: [PATCH 1/3] =?UTF-8?q?DDD-32=20=EA=B2=8C=EC=9E=84=20=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EB=A7=A4=EB=8B=88=EC=A0=80=20=EB=B0=8F=20?= =?UTF-8?q?=EC=94=AC=20=EB=A7=A4=EB=8B=88=EC=A0=80=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddressableAssetSettings.asset | 1 + ...gleSheetSprite_Group.asset => Group.asset} | 22 +- ...rite_Group.asset.meta => Group.asset.meta} | 0 ...et => Group_BundledAssetGroupSchema.asset} | 2 +- ... Group_BundledAssetGroupSchema.asset.meta} | 0 ...t => Group_ContentUpdateGroupSchema.asset} | 2 +- ...Group_ContentUpdateGroupSchema.asset.meta} | 0 Assets/AddressableImportSettings.asset | 19 +- .../Config/Editor/AOTGenerationConfig.asset | 19 + .../Editor/AOTGenerationConfig.asset.meta | 8 + .../Config/Editor/ColorPaletteManager.asset | 136 +++++++ .../Editor/ColorPaletteManager.asset.meta | 8 + .../Config/Editor/ImportSettingsConfig.asset | 15 + .../Editor/ImportSettingsConfig.asset.meta | 8 + .../Sirenix/GlobalSerializationConfig.asset | 2 +- .../Addressables/Sprites/Items.spriteatlasv2 | 16 - .../Sprites/Items.spriteatlasv2.meta | 30 -- .../Scenes.meta} | 2 +- .../Scenes}/Entry.unity | 30 +- .../Scenes}/Entry.unity.meta | 0 .../Scenes/Restaurant.unity} | 0 .../Scenes/Restaurant.unity.meta} | 0 Assets/_DDD/_Addressables/Scenes/Voyage.unity | 385 ++++++++++++++++++ .../Scenes/Voyage.unity.meta} | 3 +- .../_Scripts/AssetManagement/AssetManager.cs | 62 ++- .../AssetManagement/AssetManager.prefab | 47 +++ .../AssetManagement/AssetManager.prefab.meta | 7 + .../Controllers/AddressableManager.cs | 25 -- .../Controllers/AddressableManager.cs.meta | 2 - .../_Scripts/GameFlow/GameFlowAssetsSo.asset | 55 ++- .../_Scripts/GameFlow/GameFlowAssetsSo.cs | 15 + .../GameFlow/GameFlowAssetsSo.cs.meta | 2 + .../_Scripts/GameFlow/GameFlowDataSo.asset | 15 + .../GameFlow/GameFlowDataSo.asset.meta | 8 + .../_DDD/_Scripts/GameFlow/GameFlowDataSo.cs | 10 + .../_Scripts/GameFlow/GameFlowDataSo.cs.meta | 2 + .../_DDD/_Scripts/GameFlow/GameFlowManager.cs | 136 +++---- .../_Scripts/GameFlow/GameFlowManager.prefab | 10 +- .../GameFlow/GameFlowSceneMappingSo.asset | 87 +++- .../GameFlow/GameFlowSceneMappingSo.cs | 13 + .../GameFlow/GameFlowSceneMappingSo.cs.meta | 2 + .../_Scripts/GameFramework/GameManager.cs | 15 +- .../GameFramework/ManagerDefinitionSo.asset | 9 +- .../ManagerDefinitionSo.asset.meta | 2 +- .../GameFramework/ManagerDefinitionSo.cs | 11 + .../GameFramework/ManagerDefinitionSo.cs.meta | 2 + .../_Scripts/GameFramework/SceneManager.cs | 214 ++++------ .../Core/GoogleSheetManager.cs | 2 +- .../_DDD/_Scripts/InputSystem/InputManager.cs | 28 +- Assets/_DDD/_Scripts/Utilities/Singletone.cs | 1 - ProjectSettings/EditorBuildSettings.asset | 2 +- 51 files changed, 1134 insertions(+), 358 deletions(-) rename Assets/AddressableAssetsData/AssetGroups/{GoogleSheetSprite_Group.asset => Group.asset} (61%) rename Assets/AddressableAssetsData/AssetGroups/{GoogleSheetSprite_Group.asset.meta => Group.asset.meta} (100%) rename Assets/AddressableAssetsData/AssetGroups/Schemas/{GoogleSheetSprite_Group_BundledAssetGroupSchema.asset => Group_BundledAssetGroupSchema.asset} (96%) rename Assets/AddressableAssetsData/AssetGroups/Schemas/{GoogleSheetSprite_Group_BundledAssetGroupSchema.asset.meta => Group_BundledAssetGroupSchema.asset.meta} (100%) rename Assets/AddressableAssetsData/AssetGroups/Schemas/{GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset => Group_ContentUpdateGroupSchema.asset} (89%) rename Assets/AddressableAssetsData/AssetGroups/Schemas/{GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset.meta => Group_ContentUpdateGroupSchema.asset.meta} (100%) create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset create mode 100644 Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta delete mode 100644 Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2 delete mode 100644 Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta rename Assets/_DDD/{Addressables/Sprites.meta => _Addressables/Scenes.meta} (77%) rename Assets/_DDD/{_Scenes => _Addressables/Scenes}/Entry.unity (96%) rename Assets/_DDD/{_Scenes => _Addressables/Scenes}/Entry.unity.meta (100%) rename Assets/_DDD/{_Scenes/01.Restaurant.unity => _Addressables/Scenes/Restaurant.unity} (100%) rename Assets/_DDD/{_Scenes/01.Restaurant.unity.meta => _Addressables/Scenes/Restaurant.unity.meta} (100%) create mode 100644 Assets/_DDD/_Addressables/Scenes/Voyage.unity rename Assets/_DDD/{Addressables.meta => _Addressables/Scenes/Voyage.unity.meta} (67%) create mode 100644 Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab create mode 100644 Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab.meta delete mode 100644 Assets/_DDD/_Scripts/Controllers/AddressableManager.cs delete mode 100644 Assets/_DDD/_Scripts/Controllers/AddressableManager.cs.meta create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs.meta create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset.meta create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs.meta create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs create mode 100644 Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs.meta create mode 100644 Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs create mode 100644 Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs.meta diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset index 6e2b11980..9b219c592 100644 --- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -106,6 +106,7 @@ MonoBehaviour: - Atlas - Sprite - So + - Scene m_SchemaTemplates: [] m_GroupTemplateObjects: - {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSprite_Group.asset b/Assets/AddressableAssetsData/AssetGroups/Group.asset similarity index 61% rename from Assets/AddressableAssetsData/AssetGroups/GoogleSheetSprite_Group.asset rename to Assets/AddressableAssetsData/AssetGroups/Group.asset index baae61a73..3da310b14 100644 --- a/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSprite_Group.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Group.asset @@ -10,11 +10,29 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3} - m_Name: GoogleSheetSprite_Group + m_Name: Group m_EditorClassIdentifier: - m_GroupName: GoogleSheetSprite_Group + m_GroupName: Group m_GUID: 30e7f67fe9aaa7849a34c9b6e2bc53ae m_SerializeEntries: + - m_GUID: 2eb88deceda8c443db7ec557aaef30af + m_Address: Entry + m_ReadOnly: 0 + m_SerializedLabels: + - Scene + FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: a60e7a432b7eb65419f3942f4f422fb4 + m_Address: Voyage + m_ReadOnly: 0 + m_SerializedLabels: + - Scene + FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: de073d0136201ac4cbb36dbeb4b76fb2 + m_Address: Restaurant + m_ReadOnly: 0 + m_SerializedLabels: + - Scene + FlaggedDuringContentUpdateRestriction: 0 - m_GUID: e15933f76da90e742866563b5cd9e45f m_Address: Gold m_ReadOnly: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSprite_Group.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Group.asset.meta similarity index 100% rename from Assets/AddressableAssetsData/AssetGroups/GoogleSheetSprite_Group.asset.meta rename to Assets/AddressableAssetsData/AssetGroups/Group.asset.meta diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_BundledAssetGroupSchema.asset similarity index 96% rename from Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_BundledAssetGroupSchema.asset rename to Assets/AddressableAssetsData/AssetGroups/Schemas/Group_BundledAssetGroupSchema.asset index 375bbb07d..5f074ec21 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_BundledAssetGroupSchema.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_BundledAssetGroupSchema.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e5d17a21594effb4e9591490b009e7aa, type: 3} - m_Name: GoogleSheetSprite_Group_BundledAssetGroupSchema + m_Name: Group_BundledAssetGroupSchema m_EditorClassIdentifier: m_Group: {fileID: 11400000, guid: 5329bd0c1faf253408343429c6a99b39, type: 2} m_InternalBundleIdMode: 1 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_BundledAssetGroupSchema.asset.meta similarity index 100% rename from Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_BundledAssetGroupSchema.asset.meta rename to Assets/AddressableAssetsData/AssetGroups/Schemas/Group_BundledAssetGroupSchema.asset.meta diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_ContentUpdateGroupSchema.asset similarity index 89% rename from Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset rename to Assets/AddressableAssetsData/AssetGroups/Schemas/Group_ContentUpdateGroupSchema.asset index aaba67855..6a0e40789 100644 --- a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_ContentUpdateGroupSchema.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3} - m_Name: GoogleSheetSprite_Group_ContentUpdateGroupSchema + m_Name: Group_ContentUpdateGroupSchema m_EditorClassIdentifier: m_Group: {fileID: 11400000, guid: 5329bd0c1faf253408343429c6a99b39, type: 2} m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Group_ContentUpdateGroupSchema.asset.meta similarity index 100% rename from Assets/AddressableAssetsData/AssetGroups/Schemas/GoogleSheetSprite_Group_ContentUpdateGroupSchema.asset.meta rename to Assets/AddressableAssetsData/AssetGroups/Schemas/Group_ContentUpdateGroupSchema.asset.meta diff --git a/Assets/AddressableImportSettings.asset b/Assets/AddressableImportSettings.asset index 287ebfd4b..a87d31263 100644 --- a/Assets/AddressableImportSettings.asset +++ b/Assets/AddressableImportSettings.asset @@ -15,7 +15,7 @@ MonoBehaviour: rulesEnabled: 1 allowGroupCreation: 1 rules: - - path: Assets/_Datas/Addressables/(?[^/]+)/(?.*)\.spriteatlasv2 + - path: Assets/_DDD/_Addressables/(?[^/]+)/(?.*)\.spriteatlasv2 matchType: 1 groupName: groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} @@ -26,7 +26,7 @@ MonoBehaviour: LabelMode: 1 simplified: 0 addressReplacement: ${asset} - - path: Assets/_Datas/Addressables/(?[^/]+)/(?.*)\.prefab + - path: Assets/_DDD/_Addressables/(?[^/]+)/(?.*)\.prefab matchType: 1 groupName: groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} @@ -37,7 +37,7 @@ MonoBehaviour: LabelMode: 1 simplified: 0 addressReplacement: ${asset} - - path: Assets/_Datas/Addressables/(?[^/]+)/(?.*)\.png + - path: Assets/_DDD/_Addressables/(?[^/]+)/(?.*)\.png matchType: 1 groupName: groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} @@ -48,7 +48,7 @@ MonoBehaviour: LabelMode: 1 simplified: 0 addressReplacement: ${asset} - - path: Assets/_Datas/Addressables/(?[^/]+)/(?.*)\.asset + - path: Assets/_DDD/_Addressables/(?[^/]+)/(?.*)\.asset matchType: 1 groupName: groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} @@ -59,3 +59,14 @@ MonoBehaviour: LabelMode: 1 simplified: 0 addressReplacement: ${asset} + - path: Assets/_DDD/_Addressables/(?[^/]+)/(?.*)\.unity + matchType: 1 + groupName: + groupTemplate: {fileID: 11400000, guid: f804fe78e7005554f9ba60273aade35b, type: 2} + groupTemplateApplicationMode: 0 + labelRefs: [] + dynamicLabels: + - Scene + LabelMode: 1 + simplified: 0 + addressReplacement: ${asset} diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset new file mode 100644 index 000000000..014367776 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset @@ -0,0 +1,19 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1726182683, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: AOTGenerationConfig + m_EditorClassIdentifier: + automateBeforeBuilds: 0 + deleteDllAfterBuilds: 1 + AutomateForAllAOTPlatforms: 1 + automateForPlatforms: 0900000014000000 + supportSerializedTypes: [] diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta new file mode 100644 index 000000000..07d30f3f2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 69f486bcedd7c89428392f27f08ece7a +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset new file mode 100644 index 000000000..4393db143 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset @@ -0,0 +1,136 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 772478971, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: ColorPaletteManager + m_EditorClassIdentifier: + colorPalettes: + - name: Country + showAlpha: 0 + colors: + - {r: 0.776, g: 0.651, b: 0.349, a: 1} + - {r: 0.863, g: 0.761, b: 0.631, a: 1} + - {r: 0.91, g: 0.831, b: 0.686, a: 1} + - {r: 0.961, g: 0.902, b: 0.788, a: 1} + - {r: 0.753, g: 0.714, b: 0.667, a: 1} + - {r: 0.478, g: 0.573, b: 0.431, a: 1} + - {r: 0.314, g: 0.427, b: 0.31, a: 1} + - {r: 0.596, g: 0.345, b: 0.235, a: 1} + - {r: 0.545, g: 0.329, b: 0.318, a: 1} + - {r: 0.647, g: 0.204, b: 0.227, a: 1} + - {r: 0.435, g: 0.161, b: 0.063, a: 1} + - {r: 0.357, g: 0.333, b: 0.278, a: 1} + - {r: 0.976, g: 0.98, b: 0.961, a: 1} + - {r: 0.165, g: 0.271, b: 0.11, a: 1} + - name: Beach + showAlpha: 0 + colors: + - {r: 0.996, g: 0.906, b: 0.459, a: 1} + - {r: 0.314, g: 0.592, b: 0.035, a: 1} + - {r: 0.486, g: 0.953, b: 0.875, a: 1} + - {r: 0.996, g: 0.82, b: 0.212, a: 1} + - {r: 1, g: 0.769, b: 0.165, a: 1} + - {r: 0.804, g: 0.835, b: 0.753, a: 1} + - {r: 1, g: 0.769, b: 0.165, a: 1} + - {r: 1, g: 0.702, b: 0.063, a: 1} + - {r: 1, g: 0.898, b: 0.569, a: 1} + - name: Fall + showAlpha: 0 + colors: + - {r: 0.82, g: 0.722, b: 0.318, a: 1} + - {r: 0.537, g: 0.192, b: 0.153, a: 1} + - {r: 0.996, g: 0.812, b: 0.012, a: 1} + - {r: 1, g: 0.431, b: 0.02, a: 1} + - {r: 0.937, g: 0.267, b: 0.094, a: 1} + - {r: 0.42, g: 0.212, b: 0.18, a: 1} + - {r: 0.992, g: 0.651, b: 0.004, a: 1} + - {r: 0.89, g: 0.353, b: 0.086, a: 1} + - {r: 1, g: 0.443, b: 0.004, a: 1} + - {r: 0.682, g: 0.275, b: 0.137, a: 1} + - {r: 0.306, g: 0.231, b: 0.114, a: 1} + - {r: 0.384, g: 0.416, b: 0.082, a: 1} + - {r: 0.165, g: 0.157, b: 0.008, a: 1} + - {r: 0.906, g: 0.635, b: 0.227, a: 1} + - {r: 0.82, g: 0.722, b: 0.318, a: 1} + - {r: 0.745, g: 0.435, b: 0.031, a: 1} + - {r: 0.765, g: 0.682, b: 0.569, a: 1} + - {r: 0.18, g: 0.149, b: 0.075, a: 1} + - {r: 0.702, g: 0.451, b: 0.059, a: 1} + - name: Passion + showAlpha: 0 + colors: + - {r: 0.925, g: 0.682, b: 0.624, a: 1} + - {r: 0.188, g: 0.114, b: 0.224, a: 1} + - {r: 0.349, g: 0.11, b: 0.231, a: 1} + - {r: 0.435, g: 0.267, b: 0.357, a: 1} + - name: Sepia + showAlpha: 0 + colors: + - {r: 0.353, g: 0.098, b: 0.02, a: 1} + - {r: 0.663, g: 0.188, b: 0.114, a: 1} + - {r: 0.906, g: 0.643, b: 0.082, a: 1} + - {r: 0.996, g: 0.839, b: 0.322, a: 1} + - {r: 0.486, g: 0.392, b: 0.02, a: 1} + - {r: 0.294, g: 0.235, b: 0.012, a: 1} + - name: Floral + showAlpha: 0 + colors: + - {r: 0.855, g: 0.518, b: 0.412, a: 1} + - {r: 0.827, g: 0.294, b: 0.333, a: 1} + - {r: 0.737, g: 0.118, b: 0.208, a: 1} + - {r: 0.549, g: 0.149, b: 0.235, a: 1} + - {r: 0.949, g: 0.925, b: 0.784, a: 1} + - {r: 0.945, g: 0.882, b: 0.69, a: 1} + - {r: 0.871, g: 0.812, b: 0.698, a: 1} + - {r: 0.4, g: 0.196, b: 0.243, a: 1} + - {r: 0.271, g: 0.157, b: 0.227, a: 1} + - name: Underwater + showAlpha: 0 + colors: + - {r: 0.663, g: 0.416, b: 0.733, a: 1} + - {r: 0.2, g: 0.6, b: 0.698, a: 1} + - {r: 0.11, g: 0.49, b: 0.698, a: 1} + - {r: 0.439, g: 0.627, b: 0.227, a: 1} + - {r: 0, g: 0.357, b: 0.604, a: 1} + - {r: 0.067, g: 0.271, b: 0.353, a: 1} + - name: Breeze + showAlpha: 0 + colors: + - {r: 0.706, g: 1, b: 0, a: 1} + - {r: 0.651, g: 1, b: 0.404, a: 1} + - {r: 0.122, g: 1, b: 0.514, a: 1} + - {r: 0.216, g: 0.894, b: 0.961, a: 1} + - {r: 0.4, g: 1, b: 0.882, a: 1} + - {r: 0.027, g: 0.792, b: 0.8, a: 1} + - name: Clovers + showAlpha: 0 + colors: + - {r: 0.431, g: 0.549, b: 0.102, a: 1} + - {r: 0.671, g: 0.714, b: 0.071, a: 1} + - {r: 0.969, g: 0.949, b: 0.831, a: 1} + - {r: 0.886, g: 0.902, b: 0.702, a: 1} + - {r: 0.753, g: 0.824, b: 0.627, a: 1} + - {r: 0.404, g: 0.6, b: 0.4, a: 1} + - name: Tropical + showAlpha: 0 + colors: + - {r: 0.953, g: 0.647, b: 0.804, a: 1} + - {r: 0.965, g: 0.741, b: 0.871, a: 1} + - {r: 0.949, g: 0.549, b: 0.643, a: 1} + - {r: 0.992, g: 0.659, b: 0.498, a: 1} + - {r: 0.976, g: 0.792, b: 0.729, a: 1} + - {r: 0.984, g: 0.855, b: 0.725, a: 1} + - {r: 0.259, g: 0.882, b: 0.663, a: 1} + - {r: 0.349, g: 0.753, b: 0.78, a: 1} + - {r: 0.725, g: 0.976, b: 0.91, a: 1} + - {r: 0.647, g: 0.745, b: 0.957, a: 1} + - {r: 0.725, g: 0.863, b: 0.973, a: 1} + - {r: 0.89, g: 0.945, b: 0.996, a: 1} diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta new file mode 100644 index 000000000..4e1cd23f7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5f3f7631fb2749c459720417f4a19e00 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset new file mode 100644 index 000000000..338ffe3db --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 188390376, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} + m_Name: ImportSettingsConfig + m_EditorClassIdentifier: + automateBeforeBuild: 1 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta new file mode 100644 index 000000000..539f798bc --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0266e67149a9ad94881b1349d78a6f16 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset index 0e48b68bd..185befc63 100644 --- a/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset @@ -12,7 +12,7 @@ MonoBehaviour: m_Script: {fileID: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3} m_Name: GlobalSerializationConfig m_EditorClassIdentifier: - HideSerializationCautionaryMessage: 0 + HideSerializationCautionaryMessage: 1 HidePrefabCautionaryMessage: 0 HideOdinSerializeAttributeWarningMessages: 0 HideNonSerializedShowInInspectorWarningMessages: 0 diff --git a/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2 b/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2 deleted file mode 100644 index 52943a32c..000000000 --- a/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2 +++ /dev/null @@ -1,16 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!612988286 &1 -SpriteAtlasAsset: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - serializedVersion: 2 - m_MasterAtlas: {fileID: 0} - m_ImporterData: - packables: - - {fileID: 21300000, guid: 189d780f1507008429f2cdd1a2b4c9e8, type: 3} - m_IsVariant: 0 - m_ScriptablePacker: {fileID: 0} diff --git a/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta b/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta deleted file mode 100644 index 2569b9f26..000000000 --- a/Assets/_DDD/Addressables/Sprites/Items.spriteatlasv2.meta +++ /dev/null @@ -1,30 +0,0 @@ -fileFormatVersion: 2 -guid: 12a5a31425daa2547a044994a3198578 -SpriteAtlasImporter: - externalObjects: {} - textureSettings: - serializedVersion: 2 - anisoLevel: 0 - compressionQuality: 0 - maxTextureSize: 0 - textureCompression: 0 - filterMode: 1 - generateMipMaps: 0 - readable: 0 - crunchedCompression: 0 - sRGB: 1 - platformSettings: [] - packingSettings: - serializedVersion: 2 - padding: 4 - blockOffset: 0 - allowAlphaSplitting: 0 - enableRotation: 0 - enableTightPacking: 0 - enableAlphaDilation: 0 - secondaryTextureSettings: {} - variantMultiplier: 1 - bindAsDefault: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/_DDD/Addressables/Sprites.meta b/Assets/_DDD/_Addressables/Scenes.meta similarity index 77% rename from Assets/_DDD/Addressables/Sprites.meta rename to Assets/_DDD/_Addressables/Scenes.meta index df79e8b35..bb30c8311 100644 --- a/Assets/_DDD/Addressables/Sprites.meta +++ b/Assets/_DDD/_Addressables/Scenes.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 85a3e9842123aff43beeb3ada811ef2d +guid: 19c202afbafbdec47b3f6dd33bc3727c folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/_DDD/_Scenes/Entry.unity b/Assets/_DDD/_Addressables/Scenes/Entry.unity similarity index 96% rename from Assets/_DDD/_Scenes/Entry.unity rename to Assets/_DDD/_Addressables/Scenes/Entry.unity index e18bcc90b..28bf7ef08 100644 --- a/Assets/_DDD/_Scenes/Entry.unity +++ b/Assets/_DDD/_Addressables/Scenes/Entry.unity @@ -128,7 +128,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1415192492} - - component: {fileID: 1415192491} + - component: {fileID: 1415192493} m_Layer: 0 m_Name: GameManager m_TagString: Untagged @@ -136,20 +136,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &1415192491 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1415192490} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 965655bbd1b2f224196ab3275ea13a57, type: 3} - m_Name: - m_EditorClassIdentifier: - _persistent: 1 - _managerDefinitionSo: {fileID: 11400000, guid: d8346bac7a0fdab419cca3193df2ca34, type: 2} --- !u!4 &1415192492 Transform: m_ObjectHideFlags: 0 @@ -165,6 +151,20 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1415192493 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1415192490} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 965655bbd1b2f224196ab3275ea13a57, type: 3} + m_Name: + m_EditorClassIdentifier: + _persistent: 1 + _managerDefinitionSo: {fileID: 11400000, guid: cdd4d1e802374914a8c7f82a8da65bd4, type: 2} --- !u!1660057539 &9223372036854775807 SceneRoots: m_ObjectHideFlags: 0 diff --git a/Assets/_DDD/_Scenes/Entry.unity.meta b/Assets/_DDD/_Addressables/Scenes/Entry.unity.meta similarity index 100% rename from Assets/_DDD/_Scenes/Entry.unity.meta rename to Assets/_DDD/_Addressables/Scenes/Entry.unity.meta diff --git a/Assets/_DDD/_Scenes/01.Restaurant.unity b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity similarity index 100% rename from Assets/_DDD/_Scenes/01.Restaurant.unity rename to Assets/_DDD/_Addressables/Scenes/Restaurant.unity diff --git a/Assets/_DDD/_Scenes/01.Restaurant.unity.meta b/Assets/_DDD/_Addressables/Scenes/Restaurant.unity.meta similarity index 100% rename from Assets/_DDD/_Scenes/01.Restaurant.unity.meta rename to Assets/_DDD/_Addressables/Scenes/Restaurant.unity.meta diff --git a/Assets/_DDD/_Addressables/Scenes/Voyage.unity b/Assets/_DDD/_Addressables/Scenes/Voyage.unity new file mode 100644 index 000000000..8e24aa376 --- /dev/null +++ b/Assets/_DDD/_Addressables/Scenes/Voyage.unity @@ -0,0 +1,385 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 10 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &203844586 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 203844589} + - component: {fileID: 203844588} + - component: {fileID: 203844587} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &203844587 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203844586} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Version: 3 + m_UsePipelineSettings: 1 + m_AdditionalLightsShadowResolutionTier: 2 + m_LightLayerMask: 1 + m_RenderingLayers: 1 + m_CustomShadowLayers: 0 + m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 + m_LightCookieSize: {x: 1, y: 1} + m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 0 +--- !u!108 &203844588 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203844586} + m_Enabled: 1 + serializedVersion: 11 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 +--- !u!4 &203844589 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 203844586} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &961739749 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 961739753} + - component: {fileID: 961739752} + - component: {fileID: 961739751} + - component: {fileID: 961739750} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &961739750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961739749} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_RenderShadows: 1 + m_RequiresDepthTextureOption: 2 + m_RequiresOpaqueTextureOption: 2 + m_CameraType: 0 + m_Cameras: [] + m_RendererIndex: -1 + m_VolumeLayerMask: + serializedVersion: 2 + m_Bits: 1 + m_VolumeTrigger: {fileID: 0} + m_VolumeFrameworkUpdateModeOption: 2 + m_RenderPostProcessing: 0 + m_Antialiasing: 0 + m_AntialiasingQuality: 2 + m_StopNaN: 0 + m_Dithering: 0 + m_ClearDepth: 1 + m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} + m_RequiresDepthTexture: 0 + m_RequiresColorTexture: 0 + m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 +--- !u!81 &961739751 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961739749} + m_Enabled: 1 +--- !u!20 &961739752 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961739749} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &961739753 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 961739749} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 961739753} + - {fileID: 203844589} diff --git a/Assets/_DDD/Addressables.meta b/Assets/_DDD/_Addressables/Scenes/Voyage.unity.meta similarity index 67% rename from Assets/_DDD/Addressables.meta rename to Assets/_DDD/_Addressables/Scenes/Voyage.unity.meta index edc3cede4..dfcf2c4c1 100644 --- a/Assets/_DDD/Addressables.meta +++ b/Assets/_DDD/_Addressables/Scenes/Voyage.unity.meta @@ -1,6 +1,5 @@ fileFormatVersion: 2 -guid: 1dfca4dd026496c4693f1dccfc3a8033 -folderAsset: yes +guid: a60e7a432b7eb65419f3942f4f422fb4 DefaultImporter: externalObjects: {} userData: diff --git a/Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs index 8ec60d46d..edf4ddecb 100644 --- a/Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs +++ b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.cs @@ -1,7 +1,12 @@ using System; +using System.Linq; +using System.Threading.Tasks; +using UnityEditor.AddressableAssets; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; +using UnityEngine.ResourceManagement.ResourceProviders; +using UnityEngine.SceneManagement; namespace DDD { @@ -24,15 +29,70 @@ public async void PostInit() } } - public static async Awaitable LoadAsset(string key) where T : UnityEngine.Object + public static async Task LoadAsset(string key) where T : UnityEngine.Object { var handle = Addressables.LoadAssetAsync(key); await handle.Task; + if (handle.Status == AsyncOperationStatus.Succeeded) return handle.Result; Debug.LogError($"Addressable load failed : {key}"); return null; } + + public static async Task LoadAsset(AssetReference reference) where T : UnityEngine.Object + { + if (reference == null) + { + Debug.LogError("Null AssetReference"); + return null; + } + + var handle = reference.LoadAssetAsync(); + await handle.Task; + + if (handle.Status == AsyncOperationStatus.Succeeded) + return handle.Result; + + Debug.LogError($"AssetReference load failed: {reference.RuntimeKey}"); + return null; + } + + public static async Task LoadScene(string key, LoadSceneMode mode = LoadSceneMode.Additive) + { + var handle = Addressables.LoadSceneAsync(key, mode); + await handle.Task; + + if (handle.Status == AsyncOperationStatus.Succeeded) + return handle.Result; + + Debug.LogError($"Scene load failed: {key}"); + return default; + } + + public static async Task UnloadScene(SceneInstance sceneInstance) + { + var handle = Addressables.UnloadSceneAsync(sceneInstance); + await handle.Task; + } + + public static bool HasLabel(string addressKey, string label) + { +#if UNITY_EDITOR + var settings = AddressableAssetSettingsDefaultObject.Settings; + if (settings == null) return false; + + var entry = settings.groups + .SelectMany(g => g.entries) + .FirstOrDefault(e => e.address == addressKey); + + if (entry == null) return false; + + return entry.labels.Contains(label); +#else + return true; +#endif + } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab new file mode 100644 index 000000000..80b46c13c --- /dev/null +++ b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab @@ -0,0 +1,47 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &3551048425852892906 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1415126601904257055} + - component: {fileID: 2098954470556750352} + m_Layer: 0 + m_Name: AssetManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1415126601904257055 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3551048425852892906} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2098954470556750352 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3551048425852892906} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 38667042b7dae844b813b6d15d63ec65, type: 3} + m_Name: + m_EditorClassIdentifier: + _persistent: 1 diff --git a/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab.meta b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab.meta new file mode 100644 index 000000000..628f637ed --- /dev/null +++ b/Assets/_DDD/_Scripts/AssetManagement/AssetManager.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 95aca5968f190f24eab9bd122ab241bc +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs b/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs deleted file mode 100644 index 69df5d185..000000000 --- a/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System.Linq; -#if UNITY_EDITOR -using UnityEditor.AddressableAssets; -#endif - -public class AddressableManager : Singleton -{ - public static bool HasLabel(string addressKey, string label) - { -#if UNITY_EDITOR - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) return false; - - var entry = settings.groups - .SelectMany(g => g.entries) - .FirstOrDefault(e => e.address == addressKey); - - if (entry == null) return false; - - return entry.labels.Contains(label); -#else - return true; -#endif - } -} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs.meta b/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs.meta deleted file mode 100644 index 91300753d..000000000 --- a/Assets/_DDD/_Scripts/Controllers/AddressableManager.cs.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 85a4615ed6971ef4aa78a1b01d8a8be3 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset index 02bf00b2d..e68c2d6c5 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.asset @@ -9,6 +9,57 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 0} + m_Script: {fileID: 11500000, guid: 5a7982cc52e32e14c916a8144c5184b0, type: 3} m_Name: GameFlowAssetsSo - m_EditorClassIdentifier: Assembly-CSharp:DDD:GameFlowAssetsSo + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: FlowItems + Entry: 7 + Data: 0|System.Collections.Generic.Dictionary`2[[DDD.GameFlowState, Assembly-CSharp],[System.Collections.Generic.List`1[[System.String, + mscorlib]], mscorlib]], mscorlib + - Name: comparer + Entry: 7 + Data: 1|System.Collections.Generic.EnumEqualityComparer`1[[DDD.GameFlowState, + Assembly-CSharp]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: FlowAssets + Entry: 7 + Data: 2|System.Collections.Generic.Dictionary`2[[DDD.GameFlowState, Assembly-CSharp],[System.Collections.Generic.List`1[[UnityEngine.AddressableAssets.AssetReference, + Unity.Addressables]], mscorlib]], mscorlib + - Name: comparer + Entry: 9 + Data: 1 + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs new file mode 100644 index 000000000..de3d5f0be --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEngine; +using UnityEngine.AddressableAssets; + +namespace DDD +{ + // Dictionary를 인스펙터창에서 저장하려면 Odin의 SerializedScriptableObject을 상속받아야 함 + [CreateAssetMenu(fileName = "GameFlowAssetsSo", menuName = "GameFlow/GameFlowAssetsSo")] + public class GameFlowAssetsSo : SerializedScriptableObject + { + public Dictionary> FlowItems = new(); + public Dictionary> FlowAssets = new(); + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs.meta b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs.meta new file mode 100644 index 000000000..82fd67885 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowAssetsSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5a7982cc52e32e14c916a8144c5184b0 \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset new file mode 100644 index 000000000..8be090de7 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset @@ -0,0 +1,15 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b72ae9e11a346704aaca5a0651dbc47e, type: 3} + m_Name: GameFlowDataSo + m_EditorClassIdentifier: + CurrentGameState: 0 diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset.meta b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset.meta new file mode 100644 index 000000000..7d0054ca9 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 80e88e1d5a0875148b96f6eeccd024d0 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs new file mode 100644 index 000000000..3e2b65198 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs @@ -0,0 +1,10 @@ +using UnityEngine; + +namespace DDD +{ + [CreateAssetMenu(fileName = "GameFlowDataSo", menuName = "GameFlow/GameFlowDataSo")] + public class GameFlowDataSo : ScriptableObject + { + public GameFlowState CurrentGameState; + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs.meta b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs.meta new file mode 100644 index 000000000..f48bf9cda --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowDataSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: b72ae9e11a346704aaca5a0651dbc47e \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index bc690f1b5..ce01d32f7 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -1,98 +1,66 @@ using System; -using System.Collections; using System.Collections.Generic; -using Sirenix.OdinInspector; +using System.Threading.Tasks; using UnityEngine; -using UnityEngine.AddressableAssets; using UnityEngine.SceneManagement; -using UnityEngine.Serialization; namespace DDD { - public enum GameFlowState { None = 0, ReadyForRestaurant = 1, RunRestaurant = 2, SettlementRestaurant = 3, - } - - public class GameFlowDataSo : ScriptableObject - { - public GameFlowState CurrentGameState; - } - - [CreateAssetMenu(fileName = "GameFlowAssetsSo", menuName = "GameFlow/GameFlowAssetsSo")] - public class GameFlowAssetsSo : ScriptableObject - { - [ShowInInspector] - public Dictionary> FlowItems = new(); - - [ShowInInspector] - public Dictionary> FlowAssets = new(); - } - - [CreateAssetMenu(fileName = "GameFlowSceneMappingSo", menuName = "GameFlow/GameFlowSceneMappingSo")] - public class GameFlowSceneMappingSo : ScriptableObject - { - [ShowInInspector] - public Dictionary FlowToSceneMapping = new(); - } + } public class GameFlowManager : Singleton, IManager { - private GameFlowDataSo _gameFlowDataSo; + public GameFlowDataSo GameFlowDataSo; public GameFlowAssetsSo GameFlowAssetsSo; public GameFlowSceneMappingSo GameFlowSceneMappingSo; public void Init() { - _gameFlowDataSo = ScriptableObject.CreateInstance(); + } - public void PostInit() + public async void PostInit() { SceneManager.Instance.OnSceneChanged += OnFlowSceneOpened; - if (IsGameStarted() == false) + try { - ChangeFlow(GameFlowState.ReadyForRestaurant); + if (IsGameStarted() == false) + { + await Task.Delay(3000); + await ChangeFlow(GameFlowState.ReadyForRestaurant); + } + } + catch (Exception e) + { + Debug.LogWarning(e); } } - public bool IsGameStarted() => _gameFlowDataSo.CurrentGameState != GameFlowState.None; + public bool IsGameStarted() => GameFlowDataSo.CurrentGameState != GameFlowState.None; - protected override void Awake() + public async Task ChangeFlow(GameFlowState newFlowState) { - base.Awake(); - } - - private void Start() - { - } - - private bool CanChangeFlow(GameFlowState newFlowState) - { - return true; - } - - public void ChangeFlow(GameFlowState newFlowState) - { - StartCoroutine(ChangeFlowCoroutine(newFlowState)); - } - - private IEnumerator ChangeFlowCoroutine(GameFlowState newFlowState) - { - if (CanChangeFlow(newFlowState) == false) + if (!CanChangeFlow(newFlowState)) { Debug.LogError("Can't change flow"); - yield break; + return; } EndCurrentFlow(); - + await ReadyNewFlow(newFlowState); + } + + private bool CanChangeFlow(GameFlowState newFlowState) + { + return true; } public void EndCurrentFlow() @@ -100,32 +68,31 @@ public void EndCurrentFlow() } - public IEnumerator ReadyNewFlow(GameFlowState newFlowState) + public async Task ReadyNewFlow(GameFlowState newFlowState) { - OpenFlowScene(newFlowState); - - // Ready Assets - if (GameFlowAssetsSo.FlowItems.ContainsKey(newFlowState)) + if (GameFlowAssetsSo.FlowItems.TryGetValue(newFlowState, out var stringKeys)) { - List Items = GameFlowAssetsSo.FlowItems[newFlowState]; - // Addressables.LoadAssetsAsync(Items, null); - // TODO : 여러 에셋 로드하고, 콜백 받을때까지 기다리기 - - // Wait - } + List> loadTasks = new(stringKeys.Count); + foreach (var key in stringKeys) + { + loadTasks.Add(AssetManager.LoadAsset(key)); + } - if (GameFlowAssetsSo.FlowAssets.ContainsKey(newFlowState)) - { - //List Assets = GameFlowAssets.FlowItems[newFlowState]; - // Addressables.LoadAssetsAsync(Assets, ) - // TODO : 여러 에셋 로드하고, 콜백 받을때까지 기다리기 - - // Wait + await Task.WhenAll(loadTasks); } - - // Ready Scene - GetFlowScene(newFlowState, out var flowScene); - yield return new WaitUntil(() => _currentScene == flowScene ); + + if (GameFlowAssetsSo.FlowAssets.TryGetValue(newFlowState, out var assetRefs)) + { + List> loadTasks = new(assetRefs.Count); + foreach (var assetRef in assetRefs) + { + loadTasks.Add(AssetManager.LoadAsset(assetRef)); + } + + await Task.WhenAll(loadTasks); + } + + OpenFlowScene(newFlowState); StartFlow(); } @@ -134,7 +101,7 @@ public void OpenFlowScene(GameFlowState newFlowState) { if (GetFlowScene(newFlowState, out var sceneToLoad)) { - SceneManager.Instance.RequestSceneLoad(sceneToLoad); + SceneManager.Instance.ActivateScene(sceneToLoad); } else { @@ -148,14 +115,9 @@ public void OnFlowSceneOpened(Scene newScene) _currentScene = newScene; } - public bool GetFlowScene(GameFlowState flowState, out Scene scene) + public bool GetFlowScene(GameFlowState flowState, out SceneType sceneType) { - if (GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out scene)) - { - return true; - } - - return false; + return GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out sceneType); } public void StartFlow() diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.prefab b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.prefab index 9bcde9781..49b40c7bb 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.prefab +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.prefab @@ -45,10 +45,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: _persistent: 1 - GameFlowSceneMapping: {fileID: 0} - FlowAsset: - m_AssetGUID: e15933f76da90e742866563b5cd9e45f - m_SubObjectName: - m_SubObjectType: - m_SubObjectGUID: - m_EditorAssetChanged: 1 + GameFlowDataSo: {fileID: 11400000, guid: 80e88e1d5a0875148b96f6eeccd024d0, type: 2} + GameFlowAssetsSo: {fileID: 11400000, guid: 4fca93ffece40ff48973532398011d84, type: 2} + GameFlowSceneMappingSo: {fileID: 11400000, guid: 11d1c2609268ac14fa627958ee097fac, type: 2} diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset index 062101be3..1a9f3668c 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.asset @@ -9,6 +9,89 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 0} + m_Script: {fileID: 11500000, guid: 72f94df4b8d880240809c43494de628b, type: 3} m_Name: GameFlowSceneMappingSo - m_EditorClassIdentifier: Assembly-CSharp:DDD:GameFlowSceneMappingSo + m_EditorClassIdentifier: + serializationData: + SerializedFormat: 2 + SerializedBytes: + ReferencedUnityObjects: [] + SerializedBytesString: + Prefab: {fileID: 0} + PrefabModificationsReferencedUnityObjects: [] + PrefabModifications: [] + SerializationNodes: + - Name: FlowToSceneMapping + Entry: 7 + Data: 0|System.Collections.Generic.Dictionary`2[[DDD.GameFlowState, Assembly-CSharp],[DDD.SceneType, + Assembly-CSharp]], mscorlib + - Name: comparer + Entry: 7 + Data: 1|System.Collections.Generic.EnumEqualityComparer`1[[DDD.GameFlowState, + Assembly-CSharp]], mscorlib + - Name: + Entry: 12 + Data: 0 + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: + - Name: + Entry: 12 + Data: 4 + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 0 + - Name: $v + Entry: 3 + Data: 0 + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 1 + - Name: $v + Entry: 3 + Data: 1 + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 2 + - Name: $v + Entry: 3 + Data: 1 + - Name: + Entry: 8 + Data: + - Name: + Entry: 7 + Data: + - Name: $k + Entry: 3 + Data: 3 + - Name: $v + Entry: 3 + Data: 1 + - Name: + Entry: 8 + Data: + - Name: + Entry: 13 + Data: + - Name: + Entry: 8 + Data: diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs new file mode 100644 index 000000000..19d68f72f --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using Sirenix.OdinInspector; +using UnityEngine; + +namespace DDD +{ + // Dictionary를 인스펙터창에서 저장하려면 Odin의 SerializedScriptableObject을 상속받아야 함 + [CreateAssetMenu(fileName = "GameFlowSceneMappingSo", menuName = "GameFlow/GameFlowSceneMappingSo")] + public class GameFlowSceneMappingSo : SerializedScriptableObject + { + public Dictionary FlowToSceneMapping = new(); + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs.meta b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs.meta new file mode 100644 index 000000000..08bad928f --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowSceneMappingSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 72f94df4b8d880240809c43494de628b \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFramework/GameManager.cs b/Assets/_DDD/_Scripts/GameFramework/GameManager.cs index a31f9d18b..56b288405 100644 --- a/Assets/_DDD/_Scripts/GameFramework/GameManager.cs +++ b/Assets/_DDD/_Scripts/GameFramework/GameManager.cs @@ -3,12 +3,6 @@ namespace DDD { - [CreateAssetMenu(fileName = "ManagerDefinitionSo", menuName = "GameFramework/ManagerDefinitionSo")] - public class ManagerDefinitionSo : ScriptableObject - { - public List ManagerClasses; - } - public class GameManager : Singleton { [SerializeField] @@ -16,10 +10,15 @@ public class GameManager : Singleton private List _managerInstances; - protected override void OnAwake() + protected void Start() { base.OnAwake(); + if (_managerDefinitionSo == null) + { + Debug.LogError("_managerDefinitionSo"); + return; + } // Entry Scene에서 뭘 해야할까? // 매니저 초기화 @@ -28,6 +27,8 @@ protected override void OnAwake() foreach (var managerObject in _managerDefinitionSo.ManagerClasses) { var managerInstance = Instantiate(managerObject); + managerInstance.name = managerObject.name; + _managerInstances.Add(managerInstance); if (managerInstance is IManager manager) { diff --git a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset index 88f57768c..24ae09132 100644 --- a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset +++ b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset @@ -9,10 +9,11 @@ MonoBehaviour: m_GameObject: {fileID: 0} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 0} + m_Script: {fileID: 11500000, guid: 4743c803a9907d64394dafe4e4237c2a, type: 3} m_Name: ManagerDefinitionSo - m_EditorClassIdentifier: Assembly-CSharp:DDD:ManagerDefinitionSo + m_EditorClassIdentifier: ManagerClasses: - - {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3} - - {fileID: 6471498998539637564, guid: fa2ad62c75b1549f09597e47ed5f7cfb, type: 3} + - {fileID: 2098954470556750352, guid: 95aca5968f190f24eab9bd122ab241bc, type: 3} - {fileID: 4889131746858770208, guid: d90fdb17f0162334daadc6fc93e9a0e3, type: 3} + - {fileID: 6471498998539637564, guid: fa2ad62c75b1549f09597e47ed5f7cfb, type: 3} + - {fileID: 7665229218737596710, guid: 71b177c2a18314c588da30429451666a, type: 3} diff --git a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset.meta b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset.meta index 5a1afd285..967986024 100644 --- a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset.meta +++ b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d8346bac7a0fdab419cca3193df2ca34 +guid: cdd4d1e802374914a8c7f82a8da65bd4 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs new file mode 100644 index 000000000..9e0fc8c27 --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; +using UnityEngine; + +namespace DDD +{ + [CreateAssetMenu(fileName = "ManagerDefinitionSo", menuName = "GameFramework/ManagerDefinitionSo")] + public class ManagerDefinitionSo : ScriptableObject + { + public List ManagerClasses; + } +} \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs.meta b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs.meta new file mode 100644 index 000000000..93a0c4e8a --- /dev/null +++ b/Assets/_DDD/_Scripts/GameFramework/ManagerDefinitionSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 4743c803a9907d64394dafe4e4237c2a \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs index 5bff1dc97..7dfa1c17d 100644 --- a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs +++ b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs @@ -1,163 +1,117 @@ using System; +using System.Collections.Generic; using System.Threading.Tasks; -using DG.Tweening; -using Sirenix.OdinInspector; -using UnityEditor; using UnityEngine; +using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; namespace DDD { public enum SceneType { - Title = 0, + Entry = 0, Restaurant = 1, Voyage = 2 } - - public static class SceneTypeExtensions - { - public static string ToSceneName(this SceneType sceneType) - { - return sceneType switch - { - SceneType.Title => "00.Title", - SceneType.Restaurant => "01.Restaurant", - _ => throw new ArgumentOutOfRangeException(nameof(sceneType), sceneType, null) - }; - } - } - - public class SceneDefinition : ScriptableObject - { - - } public class SceneManager : Singleton, IManager { + private Dictionary _loadedScenes; + public Action OnSceneChanged; public void Init() { - // Load Scene Data + Array sceneTypeArray = Enum.GetValues(typeof(SceneType)); + _loadedScenes = new Dictionary(sceneTypeArray.Length); } - public void PostInit() + public async void PostInit() { - } - - public void RequestSceneLoad(Scene sceneToLoad) - { - //TODO - print($"Scene Load : {sceneToLoad.name}"); - // onSceneTransitionStarted.Broadcast() - } - - - - - [Title("연출")] - [SerializeField] - private float _fadeTime = 0.5f; - - public SceneType CurrentSceneType { get; private set; } - - private GameObject _fadePanel; - private CanvasGroup _fadeCanvasGroup; - - private Tween _fadeIn; - private Tween _fadeOut; - - // protected override void OnAwake() - // { - // base.OnAwake(); - // - // _fadePanel = transform.Find("Canvas/FadePanel").gameObject; - // _fadeCanvasGroup = _fadePanel.GetComponent(); - // } - - // private void Start() - // { - // CurrentSceneType = SceneType.Title; - // - // _fadePanel.SetActive(false); - // _fadeCanvasGroup.alpha = 0f; - // - // _fadeIn = _fadeCanvasGroup.DOFade(1f, _fadeTime).SetUpdate(true).SetAutoKill(false).Pause(); - // _fadeOut = _fadeCanvasGroup.DOFade(0f, _fadeTime).SetUpdate(true).SetAutoKill(false).Pause(); - // } - - // private void OnDestroy() - // { - // _fadeIn?.Kill(); - // _fadeOut?.Kill(); - // } - - public async Task FadeIn() - { - if (_fadeIn == null) - { - Debug.LogWarning("FadeIn 트윈이 설정되지 않았습니다."); - return; - } - - _fadePanel.SetActive(true); - - _fadeIn.Restart(); - await _fadeIn.AsyncWaitForCompletion(); - } - - public async Task FadeOut() - { - if (_fadeOut == null) - { - Debug.LogWarning("FadeOut 트윈이 설정되지 않았습니다."); - return; - } - - _fadeOut.Restart(); - - await _fadeOut.AsyncWaitForCompletion(); - - _fadePanel.SetActive(false); - } - - public async Task ChangeScene(SceneType sceneType) - { - string changeSceneName; - try { - changeSceneName = sceneType.ToSceneName(); + foreach (SceneType sceneType in Enum.GetValues(typeof(SceneType))) + { + if (sceneType == SceneType.Entry) continue; + + var sceneInstance = await AssetManager.LoadScene(sceneType.ToString()); + if (sceneInstance.Scene.IsValid()) + { + _loadedScenes[sceneType] = sceneInstance; + + foreach (var go in sceneInstance.Scene.GetRootGameObjects()) + { + go.SetActive(false); + } + } + } } - catch (ArgumentOutOfRangeException e) + catch (Exception e) { - Debug.LogError($"[GameManager] 정의되지 않은 SceneType: {sceneType} - {e.Message}"); - return; + Debug.LogWarning($"Scene preload failed\n{e}"); } - - await FadeIn(); - - AsyncOperation loadSceneAsync = UnityEngine.SceneManagement.SceneManager.LoadSceneAsync(changeSceneName); - while (loadSceneAsync is { isDone: false }) - await Task.Yield(); - - // 씬 로딩 후 초기화 작업 - CameraManager.Instance.ChangeScene(sceneType); - InputManager.Instance.ChangeScene(sceneType); - - CurrentSceneType = sceneType; - - await Task.Delay(1000); - await FadeOut(); - - Debug.Log($"{changeSceneName} 씬으로 전환 완료"); } - public void ChangeSceneByIndex(int index) + public SceneInstance GetSceneInstance(SceneType sceneType) => _loadedScenes[sceneType]; + + public async Task PreloadSceneAsync(SceneType sceneType) { - var sceneType = (SceneType)index; - _ = ChangeScene(sceneType); + if (_loadedScenes.ContainsKey(sceneType)) + return; + + string key = sceneType.ToString(); + SceneInstance sceneInstance = await AssetManager.LoadScene(key); + + if (sceneInstance.Scene.IsValid()) + { + _loadedScenes[sceneType] = sceneInstance; + + foreach (var root in sceneInstance.Scene.GetRootGameObjects()) + { + root.SetActive(false); + } + } + else + { + Debug.LogError($"[SceneManager] Failed to preload scene: {sceneType}"); + } + } + + public void ActivateScene(SceneType sceneType) + { + if (_loadedScenes.TryGetValue(sceneType, out var sceneInstance)) + { + foreach (var root in sceneInstance.Scene.GetRootGameObjects()) + { + root.SetActive(true); + } + + UnityEngine.SceneManagement.SceneManager.SetActiveScene(sceneInstance.Scene); + OnSceneChanged?.Invoke(sceneInstance.Scene); + } + else + { + Debug.LogError($"[SceneManager] Scene not loaded: {sceneType}"); + } + } + + public void DeactivateScene(SceneType sceneType) + { + if (_loadedScenes.TryGetValue(sceneType, out var sceneInstance)) + { + foreach (var root in sceneInstance.Scene.GetRootGameObjects()) + { + root.SetActive(false); + } + } + } + + public async Task UnloadSceneAsync(SceneType sceneType) + { + if (_loadedScenes.TryGetValue(sceneType, out var sceneInstance)) + { + await AssetManager.UnloadScene(GetSceneInstance(sceneType)); + } } } } \ No newline at end of file diff --git a/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs b/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs index 4c1e10568..81e9a3ae1 100644 --- a/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs +++ b/Assets/_DDD/_Scripts/GenerateGoogleSheet/Core/GoogleSheetManager.cs @@ -680,7 +680,7 @@ private async Task InternalCreateGoogleSheetSoAsync() if (string.IsNullOrEmpty(spriteKey)) continue; - if (!AddressableManager.HasLabel(spriteKey, "Sprite")) + if (!AssetManager.HasLabel(spriteKey, "Sprite")) { Debug.LogWarning($"[GoogleSheetManager] Sprite 라벨 없음: {spriteKey}"); continue; diff --git a/Assets/_DDD/_Scripts/InputSystem/InputManager.cs b/Assets/_DDD/_Scripts/InputSystem/InputManager.cs index b19f1cc9e..c39d3a2df 100644 --- a/Assets/_DDD/_Scripts/InputSystem/InputManager.cs +++ b/Assets/_DDD/_Scripts/InputSystem/InputManager.cs @@ -31,20 +31,20 @@ protected override void OnAwake() _currentPlayerInput = GetComponent(); } - public void ChangeScene(SceneType sceneType) - { - switch (sceneType) - { - case SceneType.Title: - SwitchCurrentActionMap(InputActionMaps.Ui); - break; - case SceneType.Restaurant: - SwitchCurrentActionMap(InputActionMaps.Restaurant); - break; - default: - throw new System.Exception("Invalid scene name"); - } - } + // public void ChangeScene(SceneType sceneType) + // { + // switch (sceneType) + // { + // case SceneType.Title: + // SwitchCurrentActionMap(InputActionMaps.Ui); + // break; + // case SceneType.Restaurant: + // SwitchCurrentActionMap(InputActionMaps.Restaurant); + // break; + // default: + // throw new System.Exception("Invalid scene name"); + // } + // } private bool IsNullCurrentPlayerInput() { diff --git a/Assets/_DDD/_Scripts/Utilities/Singletone.cs b/Assets/_DDD/_Scripts/Utilities/Singletone.cs index ad288bed5..00c3cabeb 100644 --- a/Assets/_DDD/_Scripts/Utilities/Singletone.cs +++ b/Assets/_DDD/_Scripts/Utilities/Singletone.cs @@ -1,7 +1,6 @@ using JetBrains.Annotations; using UnityEngine; -[DefaultExecutionOrder(-2)] public abstract class Singleton : Singleton where T : MonoBehaviour { #region Fields diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 1bf5d87ff..187cfa3b3 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -9,7 +9,7 @@ EditorBuildSettings: path: Assets/_DDD/_Scenes/00.Title.unity guid: 99c9720ab356a0642a771bea13969a05 - enabled: 1 - path: Assets/_DDD/_Scenes/01.Restaurant.unity + path: Assets/_DDD/_Addressables/Scenes/Restaurant.unity guid: de073d0136201ac4cbb36dbeb4b76fb2 m_configObjects: addressableimportsettingslist: {fileID: 11400000, guid: ded0fd49318dc504f89f2396f0d12d69, type: 2} -- 2.45.2 From b83e4c3a5e95306e21e4a6a9079b703ad5bb89c2 Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Thu, 10 Jul 2025 19:32:01 +0900 Subject: [PATCH 2/3] =?UTF-8?q?DDD-32=20GameFlowManager=EC=9D=98=20?= =?UTF-8?q?=EA=B8=B0=EB=8A=A5=20=EC=9D=BC=EB=B6=80SceneManager=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EA=B4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs | 9 +-------- Assets/_DDD/_Scripts/GameFramework/SceneManager.cs | 7 ++++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index ce01d32f7..ebc24fd2f 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; using UnityEngine; +using UnityEngine.ResourceManagement.ResourceProviders; using UnityEngine.SceneManagement; namespace DDD @@ -27,8 +28,6 @@ public void Init() public async void PostInit() { - SceneManager.Instance.OnSceneChanged += OnFlowSceneOpened; - try { if (IsGameStarted() == false) @@ -109,12 +108,6 @@ public void OpenFlowScene(GameFlowState newFlowState) } } - private Scene _currentScene; - public void OnFlowSceneOpened(Scene newScene) - { - _currentScene = newScene; - } - public bool GetFlowScene(GameFlowState flowState, out SceneType sceneType) { return GameFlowSceneMappingSo.FlowToSceneMapping.TryGetValue(flowState, out sceneType); diff --git a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs index 7dfa1c17d..3bb19f9ad 100644 --- a/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs +++ b/Assets/_DDD/_Scripts/GameFramework/SceneManager.cs @@ -3,7 +3,6 @@ using System.Threading.Tasks; using UnityEngine; using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.SceneManagement; namespace DDD { @@ -18,7 +17,9 @@ public class SceneManager : Singleton, IManager { private Dictionary _loadedScenes; - public Action OnSceneChanged; + private SceneInstance _currentSceneInstance; + + public Action OnSceneChanged; public void Init() { @@ -87,7 +88,7 @@ public void ActivateScene(SceneType sceneType) } UnityEngine.SceneManagement.SceneManager.SetActiveScene(sceneInstance.Scene); - OnSceneChanged?.Invoke(sceneInstance.Scene); + _currentSceneInstance = sceneInstance; } else { -- 2.45.2 From 23b8a1c6c44d5fc33f294a75c9a261f3bfbadee3 Mon Sep 17 00:00:00 2001 From: Jeonghyeon Date: Mon, 14 Jul 2025 02:01:59 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=EC=8B=9C=EC=9E=91=20?= =?UTF-8?q?=EC=8B=9C=20PostInit=EC=97=90=EC=84=9C=203=EC=B4=88=20=EB=8C=80?= =?UTF-8?q?=EA=B8=B0=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs index ebc24fd2f..a6d4f6fb4 100644 --- a/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs +++ b/Assets/_DDD/_Scripts/GameFlow/GameFlowManager.cs @@ -32,7 +32,6 @@ public async void PostInit() { if (IsGameStarted() == false) { - await Task.Delay(3000); await ChangeFlow(GameFlowState.ReadyForRestaurant); } } -- 2.45.2