From 299173df4e8043f93c318ce89c6c922054fd038b Mon Sep 17 00:00:00 2001 From: NTG_Lenovo Date: Fri, 4 Jul 2025 16:22:04 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AC=EA=B8=80=20=EC=8A=A4=ED=94=84?= =?UTF-8?q?=EB=A0=88=EB=93=9C=20Sprite=20=EB=A1=9C=EC=A7=81=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD,=20Enum=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Core/GoogleSheetManager.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Assets/_Datas/02.Scripts/GenerateGoogleSheets/Core/GoogleSheetManager.cs b/Assets/_Datas/02.Scripts/GenerateGoogleSheets/Core/GoogleSheetManager.cs index b2e0be1bb..412fc538d 100644 --- a/Assets/_Datas/02.Scripts/GenerateGoogleSheets/Core/GoogleSheetManager.cs +++ b/Assets/_Datas/02.Scripts/GenerateGoogleSheets/Core/GoogleSheetManager.cs @@ -390,20 +390,24 @@ private void GenerateClassFilesPerSheet(string jsonInput) StringBuilder enumCode = new(); enumCode.AppendLine("// "); enumCode.AppendLine("using System;\n"); + enumCode.AppendLine(); + enumCode.AppendLine($"namespace {_namespace}"); + enumCode.AppendLine("{"); foreach (var kvp in enumCandidates) { - enumCode.AppendLine($"public enum {kvp.Key} \n{{"); - enumCode.AppendLine(" None = 0,"); + enumCode.AppendLine($" public enum {kvp.Key} \n{{"); + enumCode.AppendLine(" None = 0,"); int index = 1; foreach (string value in kvp.Value) { if (!string.IsNullOrWhiteSpace(value) && value != "None") - enumCode.AppendLine($" {value} = {index++},"); + enumCode.AppendLine($" {value} = {index++},"); } - enumCode.AppendLine("}\n"); + enumCode.AppendLine(" }\n"); } + enumCode.AppendLine("}"); File.WriteAllText($"{BaseAssetPath}/EnumTypes.cs", enumCode.ToString()); AssetDatabase.ImportAsset($"{BaseAssetPath}/EnumTypes.cs"); @@ -459,6 +463,7 @@ private string GenerateDataClassCode(string className, JArray items) sb.AppendLine("// "); sb.AppendLine("using System;"); sb.AppendLine("using UnityEngine;"); + sb.AppendLine(); sb.AppendLine($"namespace {_namespace}"); sb.AppendLine("{"); sb.AppendLine(" [Serializable]"); @@ -672,7 +677,7 @@ private async Task InternalCreateGoogleSheetSoAsync() if (string.IsNullOrEmpty(spriteKey)) continue; - if (!AddressableManager.HasLabel(spriteKey, "GoogleSheetSprite")) + if (!AddressableManager.HasLabel(spriteKey, "Sprite")) { Debug.LogWarning($"[GoogleSheetManager] Sprite 라벨 없음: {spriteKey}"); continue;