mirror of https://github.com/tuyoogame/YooAsset
parent
92fad7f29b
commit
2cb9278db0
|
@ -190,14 +190,22 @@ namespace YooAsset.Editor
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 忽略文件夹
|
||||||
if (AssetDatabase.IsValidFolder(assetPath))
|
if (AssetDatabase.IsValidFolder(assetPath))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// 注意:忽略编辑器下的类型资源
|
// 忽略编辑器下的类型资源
|
||||||
Type type = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
Type type = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||||
if (type == typeof(LightingDataAsset))
|
if (type == typeof(LightingDataAsset))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// 忽略Unity无法识别的无效文件
|
||||||
|
if (type == typeof(UnityEditor.DefaultAsset))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning($"Cannot pack default asset : {assetPath}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
string ext = System.IO.Path.GetExtension(assetPath);
|
string ext = System.IO.Path.GetExtension(assetPath);
|
||||||
if (ext == "" || ext == ".dll" || ext == ".cs" || ext == ".js" || ext == ".boo" || ext == ".meta" || ext == ".cginc")
|
if (ext == "" || ext == ".dll" || ext == ".cs" || ext == ".js" || ext == ".boo" || ext == ".meta" || ext == ".cginc")
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue