mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 17:50:15 +00:00
Update DefaultFilterRule.cs
修复了精灵过滤器无效的问题。
This commit is contained in:
@@ -44,10 +44,19 @@ namespace YooAsset.Editor
|
|||||||
{
|
{
|
||||||
public bool IsCollectAsset(FilterRuleData data)
|
public bool IsCollectAsset(FilterRuleData data)
|
||||||
{
|
{
|
||||||
if (AssetDatabase.GetMainAssetTypeAtPath(data.AssetPath) == typeof(Sprite))
|
var mainAssetType = AssetDatabase.GetMainAssetTypeAtPath(data.AssetPath);
|
||||||
return true;
|
if(mainAssetType == typeof(Texture2D))
|
||||||
|
{
|
||||||
|
var texImporter = TextureImporter.GetAtPath(data.AssetPath) as TextureImporter;
|
||||||
|
if (texImporter != null && texImporter.textureType == TextureImporterType.Sprite)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user