编辑器完善
This commit is contained in:
@@ -4,6 +4,8 @@ using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using AibisDream.Utility;
|
||||
using UnityEditor.U2D.PSD;
|
||||
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
@@ -114,6 +116,19 @@ namespace AibisDream.Framework
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (asset is Sprite texture && AssetImporter.GetAtPath(path) is PSDImporter psdImporter)
|
||||
{
|
||||
if (TryGetAddressableKey(path, out var addressableKeyPrefix))
|
||||
{
|
||||
addressableKey = $"{addressableKeyPrefix}[{texture.name}]";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
addressableKey = addressableKeyPrefix;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 其他情况正常输出
|
||||
return TryGetAddressableKey(path, out addressableKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user