mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
yoo2.2,9
yoo2.2,9
This commit is contained in:
@@ -42,6 +42,12 @@ namespace YooAsset.Editor
|
||||
AssetPath = assetPath;
|
||||
AssetGUID = UnityEditor.AssetDatabase.AssetPathToGUID(AssetPath);
|
||||
AssetType = UnityEditor.AssetDatabase.GetMainAssetTypeAtPath(AssetPath);
|
||||
|
||||
// 注意:如果资源文件损坏或者实例化关联脚本丢失,获取的资源类型会无效!
|
||||
if (AssetType == null)
|
||||
{
|
||||
throw new Exception($"Found invalid asset : {AssetPath}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user