From 46e9f0d99db0af54497bad04695f3dd40c70bb93 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Thu, 25 Jan 2024 16:45:56 +0800 Subject: [PATCH 1/2] Fixed error of Odin Inspector 3.1.x. --- Editor/AddressableImportSettings.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Editor/AddressableImportSettings.cs b/Editor/AddressableImportSettings.cs index 5dffe22..30de86e 100644 --- a/Editor/AddressableImportSettings.cs +++ b/Editor/AddressableImportSettings.cs @@ -17,12 +17,16 @@ public class AddressableImportSettings : ScriptableObject public bool rulesEnabled = true; [Tooltip("Creates a group if the specified group doesn't exist.")] - public bool allowGroupCreation = false; + public bool allowGroupCreation; [Space] [Tooltip("Rules for managing imported assets.")] #if ODIN_INSPECTOR - [ListDrawerSettings(HideAddButton = false,Expanded = false,DraggableItems = true,HideRemoveButton = false)] +#if ODIN_INSPECTOR + [ListDrawerSettings(HideAddButton = false, ShowFoldout = false, DraggableItems = true, HideRemoveButton = false)] +#else + [ListDrawerSettings(HideAddButton = false, Expanded = false, DraggableItems = true, HideRemoveButton = false)] +#endif [Searchable(FilterOptions = SearchFilterOptions.ISearchFilterableInterface)] #endif public List rules = new List(); From b78460329788b90016a210d70f3e7e3a99162329 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Thu, 25 Jan 2024 16:47:10 +0800 Subject: [PATCH 2/2] Fixed bug that rebuild AddressableImportSettings list not working. --- Editor/AddressableImportSettingsList.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Editor/AddressableImportSettingsList.cs b/Editor/AddressableImportSettingsList.cs index 8ca6c5d..4653aed 100644 --- a/Editor/AddressableImportSettingsList.cs +++ b/Editor/AddressableImportSettingsList.cs @@ -83,6 +83,7 @@ public void RebuildSettingsList() { var importSettingsGuidList = AssetDatabase.FindAssets($"t:{nameof(AddressableImportSettings)}"); SettingList = importSettingsGuidList.Select((guid) => AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(guid))).ToList(); + EditorUtility.SetDirty(this); AssetDatabase.SaveAssets(); }