AttackResult修改

This commit is contained in:
SoulliesOfficial
2025-11-08 22:22:43 -05:00
parent b2e9e84c52
commit 1bca620966
21 changed files with 211 additions and 37 deletions

View File

@@ -67,6 +67,9 @@ namespace Continentis.Mods
[Button]
private void CollectAllHUDData() => hudDataIDList = CollectData<HUDData>();
[Button]
private void CollectAllLocalizations() => localizationFiles = CollectLocalizations();
}
public partial class ModManifest
@@ -97,6 +100,30 @@ namespace Continentis.Mods
Debug.Log($"Collected {collectedDataIDList.Count} CardData assets.");
return collectedDataIDList;
}
private List<TextAsset> CollectLocalizations()
{
string inEditorModPath = "Assets/Mods/" + inEditorModFolder;
string dataTypeName = nameof(TextAsset);
string[] guids = UnityEditor.AssetDatabase.FindAssets($"t:{dataTypeName}", new[] { inEditorModPath });
List<TextAsset> collectedTextAssets = new List<TextAsset>();
Debug.Log($"Found {guids.Length} TextAsset assets.");
foreach (string guid in guids)
{
string path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
string assetFileName = System.IO.Path.GetFileNameWithoutExtension(path);
TextAsset data = UnityEditor.AssetDatabase.LoadAssetAtPath<TextAsset>(path);
if (assetFileName.Contains("Localization"))
{
collectedTextAssets.Add(data);
Debug.Log($"Collected localization TextAsset: {assetFileName}");
}
}
Debug.Log($"Collected {collectedTextAssets.Count} localization TextAssets.");
return collectedTextAssets;
}
}
#endif
}