구글 스프레드 Sprite 로직 변경, Enum 클래스 생성 방식 변경
This commit is contained in:
parent
8b2db5f5d4
commit
299173df4e
@ -390,10 +390,13 @@ private void GenerateClassFilesPerSheet(string jsonInput)
|
||||
StringBuilder enumCode = new();
|
||||
enumCode.AppendLine("// <auto-generated>");
|
||||
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($" public enum {kvp.Key} \n{{");
|
||||
enumCode.AppendLine(" None = 0,");
|
||||
int index = 1;
|
||||
foreach (string value in kvp.Value)
|
||||
@ -402,8 +405,9 @@ private void GenerateClassFilesPerSheet(string jsonInput)
|
||||
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("// <auto-generated>");
|
||||
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<bool> InternalCreateGoogleSheetSoAsync()
|
||||
if (string.IsNullOrEmpty(spriteKey))
|
||||
continue;
|
||||
|
||||
if (!AddressableManager.HasLabel(spriteKey, "GoogleSheetSprite"))
|
||||
if (!AddressableManager.HasLabel(spriteKey, "Sprite"))
|
||||
{
|
||||
Debug.LogWarning($"[GoogleSheetManager] Sprite 라벨 없음: {spriteKey}");
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user