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