diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs index 47593da..9c5ad25 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSetting.cs @@ -16,7 +16,7 @@ namespace YooAsset.Editor public EBuildMode BuildMode = EBuildMode.ForceRebuild; /// - /// 内置资源标签 + /// 内置资源标签(首包资源标签) /// public string BuildTags = string.Empty; @@ -34,5 +34,10 @@ namespace YooAsset.Editor /// 附加后缀格式 /// public bool AppendExtension = false; + + /// + /// 拷贝内置资源文件(首包资源文件) + /// + public bool CopyBuildinTagFiles = true; } } \ No newline at end of file diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs index eade0ec..a594dbb 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs @@ -25,11 +25,12 @@ namespace YooAsset.Editor private TextField _buildOutputField; private IntegerField _buildVersionField; private EnumField _buildModeField; - private TextField _buildTagsField; + private TextField _buildinTagsField; private PopupField _encryptionField; private EnumField _compressionField; private Toggle _appendExtensionToggle; - + private Toggle _copyBuildinTagFilesToggle; + public void CreateGUI() { try @@ -76,11 +77,11 @@ namespace YooAsset.Editor }); // 内置资源标签 - _buildTagsField = root.Q("BuildinTags"); - _buildTagsField.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.BuildTags); - _buildTagsField.RegisterValueChangedCallback(evt => + _buildinTagsField = root.Q("BuildinTags"); + _buildinTagsField.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.BuildTags); + _buildinTagsField.RegisterValueChangedCallback(evt => { - AssetBundleBuilderSettingData.Setting.BuildTags = _buildTagsField.value; + AssetBundleBuilderSettingData.Setting.BuildTags = _buildinTagsField.value; }); // 加密方法 @@ -123,6 +124,14 @@ namespace YooAsset.Editor AssetBundleBuilderSettingData.Setting.AppendExtension = _appendExtensionToggle.value; }); + // 拷贝首包文件 + _copyBuildinTagFilesToggle = root.Q("CopyBuildinFiles"); + _copyBuildinTagFilesToggle.SetValueWithoutNotify(AssetBundleBuilderSettingData.Setting.CopyBuildinTagFiles); + _copyBuildinTagFilesToggle.RegisterValueChangedCallback(evt => + { + AssetBundleBuilderSettingData.Setting.CopyBuildinTagFiles = _copyBuildinTagFilesToggle.value; + }); + // 构建按钮 var buildButton = root.Q