mirror of https://github.com/tuyoogame/YooAsset
parent
896681df87
commit
567c34d4d1
|
@ -243,8 +243,8 @@ namespace YooAsset.Editor
|
|||
return false;
|
||||
|
||||
// 忽略编辑器下的类型资源
|
||||
Type type = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||
if (type == typeof(LightingDataAsset))
|
||||
Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetPath);
|
||||
if (assetType == typeof(LightingDataAsset))
|
||||
return false;
|
||||
|
||||
// 检测原生文件是否合规
|
||||
|
@ -252,27 +252,29 @@ namespace YooAsset.Editor
|
|||
{
|
||||
string extension = StringUtility.RemoveFirstChar(System.IO.Path.GetExtension(assetPath));
|
||||
if (extension == EAssetFileExtension.unity.ToString() || extension == EAssetFileExtension.prefab.ToString() ||
|
||||
extension == EAssetFileExtension.mat.ToString() || extension == EAssetFileExtension.controller.ToString() ||
|
||||
extension == EAssetFileExtension.fbx.ToString() || extension == EAssetFileExtension.anim.ToString() ||
|
||||
extension == EAssetFileExtension.shader.ToString())
|
||||
extension == EAssetFileExtension.fbx.ToString() || extension == EAssetFileExtension.mat.ToString() ||
|
||||
extension == EAssetFileExtension.controller.ToString() || extension == EAssetFileExtension.anim.ToString() ||
|
||||
extension == EAssetFileExtension.ttf.ToString() || extension == EAssetFileExtension.shader.ToString())
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Raw file pack rule can not support file estension : {extension}");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 注意:原生文件只支持无依赖关系的资源
|
||||
/*
|
||||
string[] depends = AssetDatabase.GetDependencies(assetPath, true);
|
||||
if (depends.Length != 1)
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Raw file pack rule can not support estension : {extension}");
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
}
|
||||
else
|
||||
{
|
||||
// 忽略Unity无法识别的无效文件
|
||||
// 注意:只对非原生文件收集器处理
|
||||
if (type == typeof(UnityEditor.DefaultAsset))
|
||||
if (assetType == typeof(UnityEditor.DefaultAsset))
|
||||
{
|
||||
UnityEngine.Debug.LogWarning($"Cannot pack default asset : {assetPath}");
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue