From 47e479c0fa69346f79249e08853e0638f39b3874 Mon Sep 17 00:00:00 2001 From: yonggyun Date: Wed, 25 Jun 2025 16:16:48 +0900 Subject: [PATCH] =?UTF-8?q?=EC=95=84=EC=9D=B4=ED=85=9C=20=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=B8=94=20=EC=A0=95=EB=B3=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AssetGroups/GoogleSheetSo_Group.asset | 6 ++ Assets/Scenes/Restaurant.unity | 36 +++++++++++- ...ด.json => 2025-06-25 16-14-34 by ์ด์šฉ๊ท .json} | 30 ++++++++++ ...a => 2025-06-25 16-14-34 by ์ด์šฉ๊ท .json.meta} | 2 +- .../AutoCreated/Classes/Food.cs | 55 ++++++++++--------- .../AutoCreated/Classes/FoodSo.cs | 9 ++- .../AutoCreated/Classes/Item.cs | 30 ++++++++++ .../AutoCreated/Classes/Item.cs.meta | 2 + .../AutoCreated/Classes/ItemSo.cs | 12 ++++ .../AutoCreated/Classes/ItemSo.cs.meta | 2 + .../AutoCreated/Classes/Monster.cs | 25 +++++---- .../AutoCreated/Classes/MonsterSo.cs | 9 ++- .../AutoCreated/EnumTypes.cs | 8 +++ .../AutoCreated/GoogleSheetJson.json | 30 ++++++++++ .../Logs/GoogleSheetChangeLog.asset | 15 ++++- .../AutoCreated/So/FoodSo.asset | 4 +- .../AutoCreated/So/ItemSo.asset | 30 ++++++++++ .../AutoCreated/So/ItemSo.asset.meta | 8 +++ .../Core/GoogldSheetManager.cs | 45 ++++++++++----- 19 files changed, 292 insertions(+), 66 deletions(-) rename Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/{2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json => 2025-06-25 16-14-34 by ์ด์šฉ๊ท .json} (74%) rename Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/{2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json.meta => 2025-06-25 16-14-34 by ์ด์šฉ๊ท .json.meta} (75%) create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs.meta create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs.meta create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset create mode 100644 Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset.meta diff --git a/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSo_Group.asset b/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSo_Group.asset index 9ae9cf186..ea1b8fac4 100644 --- a/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSo_Group.asset +++ b/Assets/AddressableAssetsData/AssetGroups/GoogleSheetSo_Group.asset @@ -21,6 +21,12 @@ MonoBehaviour: m_SerializedLabels: - GoogleSheetSo FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: 5479f075b6cda4949a55b4f1e2cb6dd1 + m_Address: ItemSo + m_ReadOnly: 0 + m_SerializedLabels: + - GoogleSheetSo + FlaggedDuringContentUpdateRestriction: 0 - m_GUID: 6e22365847202cd42978093a2b420135 m_Address: MonsterSo m_ReadOnly: 0 diff --git a/Assets/Scenes/Restaurant.unity b/Assets/Scenes/Restaurant.unity index 5d66d96ce..d02387b48 100644 --- a/Assets/Scenes/Restaurant.unity +++ b/Assets/Scenes/Restaurant.unity @@ -422,10 +422,10 @@ MonoBehaviour: _namespace: DDD _availSheets: Food/Monster/Item _generateFolderPath: /_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated - _currentVersion: "0 - 2025-06-25 14:48:53 by \uC774\uC6A9\uADE0" + _currentVersion: "0 - 2025-06-25 16:14:34 by \uC774\uC6A9\uADE0" _restoreIndex: 0 _editorName: - _refreshTrigger: 1 + _refreshTrigger: 0 --- !u!114 &141274235 MonoBehaviour: m_ObjectHideFlags: 0 @@ -6483,6 +6483,37 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 04cb72fe661fd534b950283199ac4a83, type: 3} m_Name: m_EditorClassIdentifier: +--- !u!1 &1785845838 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1785845839} + m_Layer: 0 + m_Name: Unused + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!4 &1785845839 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1785845838} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.08174, y: 0.40321, z: 0} + 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!114 &1787885308 MonoBehaviour: m_ObjectHideFlags: 0 @@ -7611,3 +7642,4 @@ SceneRoots: - {fileID: 968554881} - {fileID: 1221676613} - {fileID: 121938434} + - {fileID: 1785845839} diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json similarity index 74% rename from Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json rename to Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json index 9875f0c23..d6bde372d 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json @@ -82,5 +82,35 @@ "Name": "D", "T1": 4 } + ], + "Item": [ + { + "Id": "์‹๋ณ„๋ฒˆํ˜ธ", + "Name": "์ด๋ฆ„", + "ItemType_Enum": "์•„์ดํ…œํƒ€์ž…", + "CellSizeX:int": "์…€ํฌ๊ธฐX", + "CellSizeY:int": "์…€ํฌ๊ธฐY" + }, + { + "Id": "Item001", + "Name": "๋‚˜๋ฌด์žฅํŒ", + "ItemType_Enum": "Floor", + "CellSizeX:int": 1, + "CellSizeY:int": 1 + }, + { + "Id": "Item002", + "Name": "ํ…Œ์ด๋ธ”", + "ItemType_Enum": "Furniture", + "CellSizeX:int": 2, + "CellSizeY:int": 2 + }, + { + "Id": "Item003", + "Name": "์ „๋“ฑ", + "ItemType_Enum": "WallMount", + "CellSizeX:int": "", + "CellSizeY:int": "" + } ] } \ No newline at end of file diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json.meta b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json.meta similarity index 75% rename from Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json.meta rename to Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json.meta index 752e636bb..3b6250271 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-11 14-50-56 by ๋‚จํƒœ๊ฑด.json.meta +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/BackUps/2025-06-25 16-14-34 by ์ด์šฉ๊ท .json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 1e7e04ed247b61846b3f6e4289590e2a +guid: 1f9b8f585350fe54bb7e558ae0b00e98 TextScriptImporter: externalObjects: {} userData: diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Food.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Food.cs index 5ff09fd6c..aa4600ca8 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Food.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Food.cs @@ -1,39 +1,42 @@ // using System; using UnityEngine; -[Serializable] -public class Food +namespace DDD { - /// ์‹๋ณ„ID - [Tooltip("์‹๋ณ„ID")] - public string Id; + [Serializable] + public class Food + { + /// ์‹๋ณ„ID + [Tooltip("์‹๋ณ„ID")] + public string Id; - /// ์ด๋ฆ„ - [Tooltip("์ด๋ฆ„")] - public string Name; + /// ์ด๋ฆ„ + [Tooltip("์ด๋ฆ„")] + public string Name; - /// ์š”๋ฆฌ๋„๊ตฌ - [Tooltip("์š”๋ฆฌ๋„๊ตฌ")] - public Cookware Cookware; + /// ์š”๋ฆฌ๋„๊ตฌ + [Tooltip("์š”๋ฆฌ๋„๊ตฌ")] + public Cookware Cookware; - /// ์žฌ๋ฃŒ1 - [Tooltip("์žฌ๋ฃŒ1")] - public string Ingredient1; + /// ์žฌ๋ฃŒ1 + [Tooltip("์žฌ๋ฃŒ1")] + public string Ingredient1; - /// ์žฌ๋ฃŒ2 - [Tooltip("์žฌ๋ฃŒ2")] - public string Ingredient2; + /// ์žฌ๋ฃŒ2 + [Tooltip("์žฌ๋ฃŒ2")] + public string Ingredient2; - /// ๋ง›1 - [Tooltip("๋ง›1")] - public Taste Taste1; + /// ๋ง›1 + [Tooltip("๋ง›1")] + public Taste Taste1; - /// ๋ง›2 - [Tooltip("๋ง›2")] - public Taste Taste2; + /// ๋ง›2 + [Tooltip("๋ง›2")] + public Taste Taste2; - /// Addressable ์ด๋ฏธ์ง€ ์ด๋ฆ„ - [Tooltip("Addressable ์ด๋ฏธ์ง€ ์ด๋ฆ„")] - public Sprite Sprite; + /// Addressable ์ด๋ฏธ์ง€ ์ด๋ฆ„ + [Tooltip("Addressable ์ด๋ฏธ์ง€ ์ด๋ฆ„")] + public Sprite Sprite; + } } diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/FoodSo.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/FoodSo.cs index c1514e46d..50d32c85a 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/FoodSo.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/FoodSo.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using UnityEngine; -[CreateAssetMenu(fileName = "FoodSo", menuName = "GoogleSheet/FoodSo")] -public class FoodSo : ScriptableObject +namespace DDD { - public List FoodList; + [CreateAssetMenu(fileName = "FoodSo", menuName = "GoogleSheet/FoodSo")] + public class FoodSo : ScriptableObject + { + public List FoodList; + } } diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs new file mode 100644 index 000000000..a1d8b5a78 --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs @@ -0,0 +1,30 @@ +// +using System; +using UnityEngine; +namespace DDD +{ + [Serializable] + public class Item + { + /// ์‹๋ณ„๋ฒˆํ˜ธ + [Tooltip("์‹๋ณ„๋ฒˆํ˜ธ")] + public string Id; + + /// ์ด๋ฆ„ + [Tooltip("์ด๋ฆ„")] + public string Name; + + /// ์•„์ดํ…œํƒ€์ž… + [Tooltip("์•„์ดํ…œํƒ€์ž…")] + public ItemType ItemType; + + /// ์…€ํฌ๊ธฐX + [Tooltip("์…€ํฌ๊ธฐX")] + public int CellSizeX; + + /// ์…€ํฌ๊ธฐY + [Tooltip("์…€ํฌ๊ธฐY")] + public int CellSizeY; + + } +} diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs.meta b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs.meta new file mode 100644 index 000000000..eb77ebba1 --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Item.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 5cab0c6954bc2c5408c61f1eb944b9bc \ No newline at end of file diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs new file mode 100644 index 000000000..a91f92ead --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs @@ -0,0 +1,12 @@ +// File: ItemSo.cs +using System.Collections.Generic; +using UnityEngine; + +namespace DDD +{ + [CreateAssetMenu(fileName = "ItemSo", menuName = "GoogleSheet/ItemSo")] + public class ItemSo : ScriptableObject + { + public List ItemList; + } +} diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs.meta b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs.meta new file mode 100644 index 000000000..100c30d89 --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/ItemSo.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 786eeb81014098446b41cf48e8e8210f \ No newline at end of file diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Monster.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Monster.cs index 3d8bc50e1..b379e9e02 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Monster.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/Monster.cs @@ -1,19 +1,22 @@ // using System; using UnityEngine; -[Serializable] -public class Monster +namespace DDD { - /// ์‹๋ณ„๋ฒˆํ˜ธ - [Tooltip("์‹๋ณ„๋ฒˆํ˜ธ")] - public string Id; + [Serializable] + public class Monster + { + /// ์‹๋ณ„๋ฒˆํ˜ธ + [Tooltip("์‹๋ณ„๋ฒˆํ˜ธ")] + public string Id; - /// ์ด๋ฆ„ - [Tooltip("์ด๋ฆ„")] - public string Name; + /// ์ด๋ฆ„ + [Tooltip("์ด๋ฆ„")] + public string Name; - /// ํ…Œ์ŠคํŠธ1 - [Tooltip("ํ…Œ์ŠคํŠธ1")] - public int T1; + /// ํ…Œ์ŠคํŠธ1 + [Tooltip("ํ…Œ์ŠคํŠธ1")] + public int T1; + } } diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/MonsterSo.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/MonsterSo.cs index ad0fc9c4a..e183d9c16 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/MonsterSo.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Classes/MonsterSo.cs @@ -2,8 +2,11 @@ using System.Collections.Generic; using UnityEngine; -[CreateAssetMenu(fileName = "MonsterSo", menuName = "GoogleSheet/MonsterSo")] -public class MonsterSo : ScriptableObject +namespace DDD { - public List MonsterList; + [CreateAssetMenu(fileName = "MonsterSo", menuName = "GoogleSheet/MonsterSo")] + public class MonsterSo : ScriptableObject + { + public List MonsterList; + } } diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs index 340b2a7ae..afaf79b92 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/EnumTypes.cs @@ -20,3 +20,11 @@ public enum Taste Salty = 6, } +public enum ItemType +{ + None = 0, + Floor = 1, + Furniture = 2, + WallMount = 3, +} + diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json index 9875f0c23..d6bde372d 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/GoogleSheetJson.json @@ -82,5 +82,35 @@ "Name": "D", "T1": 4 } + ], + "Item": [ + { + "Id": "์‹๋ณ„๋ฒˆํ˜ธ", + "Name": "์ด๋ฆ„", + "ItemType_Enum": "์•„์ดํ…œํƒ€์ž…", + "CellSizeX:int": "์…€ํฌ๊ธฐX", + "CellSizeY:int": "์…€ํฌ๊ธฐY" + }, + { + "Id": "Item001", + "Name": "๋‚˜๋ฌด์žฅํŒ", + "ItemType_Enum": "Floor", + "CellSizeX:int": 1, + "CellSizeY:int": 1 + }, + { + "Id": "Item002", + "Name": "ํ…Œ์ด๋ธ”", + "ItemType_Enum": "Furniture", + "CellSizeX:int": 2, + "CellSizeY:int": 2 + }, + { + "Id": "Item003", + "Name": "์ „๋“ฑ", + "ItemType_Enum": "WallMount", + "CellSizeX:int": "", + "CellSizeY:int": "" + } ] } \ No newline at end of file diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset index c6f1d4321..477bbe508 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/Logs/GoogleSheetChangeLog.asset @@ -13,8 +13,8 @@ MonoBehaviour: m_Name: GoogleSheetChangeLog m_EditorClassIdentifier: _logs: - - Editor: "\uB0A8\uD0DC\uAC74" - Timestamp: 2025-06-11 14:50:56 + - Editor: "\uC774\uC6A9\uADE0" + Timestamp: 2025-06-25 16:14:34 JsonSnapshot: "{\n \"$\uAC1C\uC694\": [\n {\n \"\": \"\uC2DC\uD2B8 \uC0DD\uC131\"\n }\n ],\n \"Food\": [\n {\n \"Id:string\": \"\uC2DD\uBCC4ID\",\n \"Name:string\": \"\uC774\uB984\",\n \"Cookware_Enum\": \"\uC694\uB9AC\uB3C4\uAD6C\",\n @@ -42,5 +42,14 @@ MonoBehaviour: },\n {\n \"Id\": \"Test002\",\n \"Name\": \"B\",\n \"T1\": 2\n },\n {\n \"Id\": \"Test003\",\n \"Name\": \"C\",\n \"T1\": 3\n },\n {\n \"Id\": \"Test004\",\n \"Name\": \"D\",\n - \"T1\": 4\n }\n ]\n}" + \"T1\": 4\n }\n ],\n \"Item\": [\n {\n \"Id\": \"\uC2DD\uBCC4\uBC88\uD638\",\n + \"Name\": \"\uC774\uB984\",\n \"ItemType_Enum\": \"\uC544\uC774\uD15C\uD0C0\uC785\",\n + \"CellSizeX:int\": \"\uC140\uD06C\uAE30X\",\n \"CellSizeY:int\": \"\uC140\uD06C\uAE30Y\"\n + },\n {\n \"Id\": \"Item001\",\n \"Name\": \"\uB098\uBB34\uC7A5\uD310\",\n + \"ItemType_Enum\": \"Floor\",\n \"CellSizeX:int\": 1,\n \"CellSizeY:int\": + 1\n },\n {\n \"Id\": \"Item002\",\n \"Name\": \"\uD14C\uC774\uBE14\",\n + \"ItemType_Enum\": \"Furniture\",\n \"CellSizeX:int\": 2,\n \"CellSizeY:int\": + 2\n },\n {\n \"Id\": \"Item003\",\n \"Name\": \"\uC804\uB4F1\",\n + \"ItemType_Enum\": \"WallMount\",\n \"CellSizeX:int\": \"\",\n \"CellSizeY:int\": + \"\"\n }\n ]\n}" MaxLogs: 100 diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/FoodSo.asset b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/FoodSo.asset index a96cbe04d..c9ba1ee56 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/FoodSo.asset +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/FoodSo.asset @@ -20,7 +20,7 @@ MonoBehaviour: Ingredient2: "\uD587\uBE5B\uB2F9\uADFC" Taste1: 1 Taste2: 2 - Sprite: {fileID: -3766852031887921369, guid: 00000000000000000000000000000000, type: 0} + Sprite: {fileID: 21300000, guid: e15933f76da90e742866563b5cd9e45f, type: 3} - Id: Food002 Name: B Cookware: 2 @@ -44,4 +44,4 @@ MonoBehaviour: Ingredient2: 3 Taste1: 5 Taste2: 6 - Sprite: {fileID: -3766852031887921369, guid: 00000000000000000000000000000000, type: 0} + Sprite: {fileID: 21300000, guid: e15933f76da90e742866563b5cd9e45f, type: 3} diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset new file mode 100644 index 000000000..d814e7622 --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset @@ -0,0 +1,30 @@ +%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: 786eeb81014098446b41cf48e8e8210f, type: 3} + m_Name: ItemSo + m_EditorClassIdentifier: + ItemList: + - Id: Item001 + Name: "\uB098\uBB34\uC7A5\uD310" + ItemType: 1 + CellSizeX: 1 + CellSizeY: 1 + - Id: Item002 + Name: "\uD14C\uC774\uBE14" + ItemType: 2 + CellSizeX: 2 + CellSizeY: 2 + - Id: Item003 + Name: "\uC804\uB4F1" + ItemType: 3 + CellSizeX: 0 + CellSizeY: 0 diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset.meta b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset.meta new file mode 100644 index 000000000..62ff33732 --- /dev/null +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/AutoCreated/So/ItemSo.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5479f075b6cda4949a55b4f1e2cb6dd1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/Core/GoogldSheetManager.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/Core/GoogldSheetManager.cs index 208c119e8..afe14d64c 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheet/Core/GoogldSheetManager.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheet/Core/GoogldSheetManager.cs @@ -11,9 +11,11 @@ using System.Linq; using JetBrains.Annotations; using Sirenix.OdinInspector; +using Unity.VisualScripting; using UnityEditor; using UnityEngine.AddressableAssets; using UnityEngine.ResourceManagement.AsyncOperations; +using ColorUtility = UnityEngine.ColorUtility; public class GoogleSheetManager : Singleton { @@ -25,6 +27,10 @@ public class GoogleSheetManager : Singleton [SerializeField, Tooltip("๊ตฌ๊ธ€ ์‹œํŠธ -> ํ™•์žฅ ํ”„๋กœ๊ทธ๋žจ -> Apps Script -> ์ƒˆ ๋ฐฐํฌ(์›น ์•ฑ) or ๋ฐฐํฌ ๊ด€๋ฆฌ -> ์›น ์•ฑ URL(~~~/exec)")] private string _googleSheetUrl; + [BoxGroup("๊ธฐ๋ณธ ์„ค์ •")] + [SerializeField, Tooltip("๊ธฐ๋ณธ ๋„ค์ž„ ์ŠคํŽ˜์ด์Šค")] + private string _namespace = "DDD"; + [BoxGroup("๊ธฐ๋ณธ ์„ค์ •")] [SerializeField, Tooltip("์ ์šฉ์‹œํ‚ฌ ์‹œํŠธ์˜ ์ด๋ฆ„์„ ์ ๊ณ , ์—ฌ๋Ÿฌ ๊ฐœ์˜ ์‹œํŠธ๋ฅผ ์ ๋Š” ๊ฒฝ์šฐ '/'๋กœ ๊ตฌ๋ถ„์ง€์–ด ์‹œํŠธ ๋‚˜์—ด\nex) \"Sheet1/Sheet2\"")] private string _availSheets = "Sheet1/Sheet2"; @@ -363,7 +369,9 @@ private void GenerateClassFilesPerSheet(string jsonInput) string enumType = null; if (rawName.EndsWith("_Enum")) { - enumType = rawName.Contains(":") ? rawName.Split(':')[1].Replace("_Enum", "") : rawName.Replace("_Enum", ""); + enumType = rawName.Contains(":") + ? rawName.Split(':')[1].Replace("_Enum", "") + : rawName.Replace("_Enum", ""); } if (!string.IsNullOrEmpty(enumType)) @@ -400,7 +408,7 @@ private void GenerateClassFilesPerSheet(string jsonInput) File.WriteAllText($"{BaseAssetPath}/EnumTypes.cs", enumCode.ToString()); AssetDatabase.ImportAsset($"{BaseAssetPath}/EnumTypes.cs"); - + if (!Directory.Exists(ClassedFullPath)) { Directory.CreateDirectory(ClassedFullPath); @@ -436,9 +444,11 @@ private string GenerateSoClassCode(string className) $"// File: {className}So.cs\n" + "using System.Collections.Generic;\n" + "using UnityEngine;\n\n" + - $"[CreateAssetMenu(fileName = \"{className}So\", menuName = \"GoogleSheet/{className}So\")]\n" + - $"public class {className}So : ScriptableObject \n" + - $"{{\n public List<{className}> {className}List;\n}}\n"; + $"namespace {_namespace}\n" + + "{\n" + + $" [CreateAssetMenu(fileName = \"{className}So\", menuName = \"GoogleSheet/{className}So\")]\n" + + $" public class {className}So : ScriptableObject \n" + + $" {{\n public List<{className}> {className}List;\n }}\n}}\n"; } private string GenerateDataClassCode(string className, JArray items) @@ -450,9 +460,11 @@ private string GenerateDataClassCode(string className, JArray items) sb.AppendLine("// "); sb.AppendLine("using System;"); sb.AppendLine("using UnityEngine;"); - - sb.AppendLine("[Serializable]"); - sb.AppendLine($"public class {className} \n{{"); + sb.AppendLine($"namespace {_namespace}"); + sb.AppendLine("{"); + sb.AppendLine(" [Serializable]"); + sb.AppendLine($" public class {className}"); + sb.AppendLine(" {"); int count = sampleRow.Properties().Count(); string[] types = new string[count]; @@ -492,13 +504,14 @@ private string GenerateDataClassCode(string className, JArray items) { if (!string.IsNullOrWhiteSpace(tooltips[i])) { - sb.AppendLine($" /// {tooltips[i]}"); - sb.AppendLine($" [Tooltip(\"{tooltips[i]}\")]"); + sb.AppendLine($" /// {tooltips[i]}"); + sb.AppendLine($" [Tooltip(\"{tooltips[i]}\")]"); } - sb.AppendLine($" public {types[i]} {names[i]};\n"); + sb.AppendLine($" public {types[i]} {names[i]};\n"); } + sb.AppendLine(" }"); sb.AppendLine("}"); return sb.ToString(); } @@ -546,7 +559,7 @@ private async Task CreateGoogleSheetSoAsync() { _isCreatingSo = false; } - + #if UNITY_EDITOR if (result) // ์„ฑ๊ณต์ ์œผ๋กœ SO ์ƒ์„ฑ๋œ ๊ฒฝ์šฐ์—๋งŒ ๋นŒ๋“œ ์ˆ˜ํ–‰ { @@ -557,7 +570,7 @@ private async Task CreateGoogleSheetSoAsync() return result; } - + private async Task InternalCreateGoogleSheetSoAsync() { JObject jsonObject = JObject.Parse(_json); @@ -691,7 +704,9 @@ private async Task InternalCreateGoogleSheetSoAsync() // โœ… Color ์ฒ˜๋ฆฌ else if (field.FieldType == typeof(Color)) { - value = ColorUtility.TryParseHtmlString(prop.Value.ToString(), out var color) ? color : Color.white; + value = ColorUtility.TryParseHtmlString(prop.Value.ToString(), out var color) + ? color + : Color.white; } // โœ… ๊ธฐ๋ณธ ํƒ€์ž… ์ฒ˜๋ฆฌ else @@ -754,7 +769,7 @@ private Type FindTypeByName(string sheetName) { return AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetTypes()) - .FirstOrDefault(t => t.Name == sheetName); + .FirstOrDefault(t => t.Namespace == "DDD" && t.Name == sheetName); } private string NormalizeEnumKey(string input)