Update EditorHelper.cs

pull/13/head
hevinci 2022-06-09 16:09:35 +08:00
parent 9c49d8d54a
commit 9d4656a1f2
1 changed files with 7 additions and 0 deletions

View File

@ -73,7 +73,14 @@ namespace YooAsset.Editor
else else
{ {
if (guids.Length != 1) if (guids.Length != 1)
{
foreach (var guid in guids)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
Debug.LogWarning($"Found multiple file : {path}");
}
throw new System.Exception($"Found multiple {settingType.Name} files !"); throw new System.Exception($"Found multiple {settingType.Name} files !");
}
string filePath = AssetDatabase.GUIDToAssetPath(guids[0]); string filePath = AssetDatabase.GUIDToAssetPath(guids[0]);
var setting = AssetDatabase.LoadAssetAtPath<TSetting>(filePath); var setting = AssetDatabase.LoadAssetAtPath<TSetting>(filePath);