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;