Merge pull request #21 from axn777/branch_share_ignore

如果依赖的是运行时以外的,不打入 share AssetBundle包
pull/24/head
何冠峰 2022-07-12 15:00:56 +08:00 committed by GitHub
commit 96f95bbd99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -185,10 +185,13 @@ namespace YooAsset.Editor
if (_referenceBundleNames.Count > 1) if (_referenceBundleNames.Count > 1)
{ {
IPackRule packRule = PackDirectory.StaticPackRule; if (!AssetPath.Contains("/Editor/") && !AssetPath.Contains("/Gizmos/"))
var bundleName = packRule.GetBundleName(new PackRuleData(AssetPath)); {
var shareBundleName = $"share_{bundleName}.{YooAssetSettingsData.Setting.AssetBundleFileVariant}"; IPackRule packRule = PackDirectory.StaticPackRule;
_shareBundleName = EditorTools.GetRegularPath(shareBundleName).ToLower(); var bundleName = packRule.GetBundleName(new PackRuleData(AssetPath));
var shareBundleName = $"share_{bundleName}.{YooAssetSettingsData.Setting.AssetBundleFileVariant}";
_shareBundleName = EditorTools.GetRegularPath(shareBundleName).ToLower();
}
} }
} }
else else