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)