From ca3c011f34e0d0fe0d864f6ee9c2d1868e0c9ec6 Mon Sep 17 00:00:00 2001 From: hevinci Date: Mon, 18 Jul 2022 12:05:40 +0800 Subject: [PATCH] Update AssetBundleBuilder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加配置保存按钮。 --- .../AssetBundleBuilderSettingData.cs | 6 +++ .../AssetBundleBuilderWindow.cs | 38 ++++++++++++++++++- .../AssetBundleBuilderWindow.uxml | 4 +- 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSettingData.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSettingData.cs index 4ef6a00..9412292 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSettingData.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderSettingData.cs @@ -19,6 +19,11 @@ namespace YooAsset.Editor } } + /// + /// 配置数据是否被修改 + /// + public static bool IsDirty { set; get; } = false; + /// /// 加载配置文件 /// @@ -34,6 +39,7 @@ namespace YooAsset.Editor { if (Setting != null) { + IsDirty = false; EditorUtility.SetDirty(Setting); AssetDatabase.SaveAssets(); Debug.Log($"{nameof(AssetBundleBuilderSetting)}.asset is saved!"); diff --git a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs index 9e613db..064cd3d 100644 --- a/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs +++ b/Assets/YooAsset/Editor/AssetBundleBuilder/AssetBundleBuilderWindow.cs @@ -22,6 +22,7 @@ namespace YooAsset.Editor private List _encryptionServicesClassTypes; private List _encryptionServicesClassNames; + private Button _saveButton; private TextField _buildOutputField; private IntegerField _buildVersionField; private EnumField _buildPipelineField; @@ -44,7 +45,14 @@ namespace YooAsset.Editor visualAsset.CloneTree(root); + // 配置保存按钮 + _saveButton = root.Q