AttackResult修改
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user