Update AssetBundleCollector

打包资源忽略Gizmos资源文件。
pull/24/head
hevinci 2022-07-12 15:38:26 +08:00
parent 96f95bbd99
commit 256844ddf5
2 changed files with 13 additions and 8 deletions

View File

@ -184,8 +184,6 @@ namespace YooAsset.Editor
}
if (_referenceBundleNames.Count > 1)
{
if (!AssetPath.Contains("/Editor/") && !AssetPath.Contains("/Gizmos/"))
{
IPackRule packRule = PackDirectory.StaticPackRule;
var bundleName = packRule.GetBundleName(new PackRuleData(AssetPath));
@ -193,7 +191,6 @@ namespace YooAsset.Editor
_shareBundleName = EditorTools.GetRegularPath(shareBundleName).ToLower();
}
}
}
else
{
if (IsRawAsset)

View File

@ -180,7 +180,15 @@ namespace YooAsset.Editor
private bool IsValidateAsset(string assetPath)
{
if (assetPath.StartsWith("Assets/") == false && assetPath.StartsWith("Packages/") == false)
{
UnityEngine.Debug.LogError($"Invalid asset path : {assetPath}");
return false;
}
if (assetPath.Contains("/Gizmos/"))
{
UnityEngine.Debug.LogWarning($"Cannot pack gizmos asset : {assetPath}");
return false;
}
if (AssetDatabase.IsValidFolder(assetPath))
return false;