diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 28043b0..2a7337b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +# [1.9.2] +### Changed +- Fixed compatibility issues with Unity 2021 +- Fixed Wizard settings been shared between multiple projects + # [1.9.1] ### Changed - Fixed non editor builds issue @@ -344,6 +349,7 @@ public bool IsValidConsumable(Consumable consumable) - First initial working version +[1.9.2]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.2 [1.9.1]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.1 [1.9.0]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.9.0 [1.8.3]: https://github.com/badawe/ScriptableObjectCollection/releases/tag/v1.8.3 diff --git a/Scripts/Editor/Core/CollectionCustomEditor.cs b/Scripts/Editor/Core/CollectionCustomEditor.cs index 756856c..183c8b9 100644 --- a/Scripts/Editor/Core/CollectionCustomEditor.cs +++ b/Scripts/Editor/Core/CollectionCustomEditor.cs @@ -116,7 +116,7 @@ private void OnClickToAddNewItem(Rect buttonRect, ReorderableList list) private float GetCollectionItemHeight(int index) { - if (itemHidden[index]) + if (itemHidden == null || itemHidden[index]) return 0; return Mathf.Max( diff --git a/Scripts/Editor/Wizzard/CreateCollectionWizard.cs b/Scripts/Editor/Wizzard/CreateCollectionWizard.cs index 51c81b6..e8ca3ae 100644 --- a/Scripts/Editor/Wizzard/CreateCollectionWizard.cs +++ b/Scripts/Editor/Wizzard/CreateCollectionWizard.cs @@ -249,33 +249,33 @@ private int MaximumNamespaceDepth private static readonly EditorPreferenceBool FoldoutSettings = new EditorPreferenceBool(FOLDOUT_SETTINGS_KEY, true); private static readonly EditorPreferenceBool FoldoutScriptableObject = - new EditorPreferenceBool(FOLDOUT_SCRIPTABLE_OBJECT_KEY, false); - private static readonly EditorPreferenceBool FoldoutScript = new EditorPreferenceBool(FOLDOUT_SCRIPT_KEY, false); + new EditorPreferenceBool(FOLDOUT_SCRIPTABLE_OBJECT_KEY, false, true); + private static readonly EditorPreferenceBool FoldoutScript = new EditorPreferenceBool(FOLDOUT_SCRIPT_KEY, false, true); private static readonly EditorPreferenceBool WaitingRecompileForContinue = - new EditorPreferenceBool(WAITING_SCRIPTS_TO_RECOMPILE_TO_CONTINUE_KEY); + new EditorPreferenceBool(WAITING_SCRIPTS_TO_RECOMPILE_TO_CONTINUE_KEY, false, true); private static readonly EditorPreferenceString LastCollectionScriptableObjectPath = - new EditorPreferenceString(LAST_COLLECTION_SCRIPTABLE_OBJECT_PATH_KEY); + new EditorPreferenceString(LAST_COLLECTION_SCRIPTABLE_OBJECT_PATH_KEY, null, true); private static readonly EditorPreferenceString LastCollectionFullName = - new EditorPreferenceString(LAST_COLLECTION_FULL_NAME_KEY); + new EditorPreferenceString(LAST_COLLECTION_FULL_NAME_KEY, null, true); private static readonly EditorPreferenceString LastScriptsTargetFolder = - new EditorPreferenceString(LAST_TARGET_SCRIPTS_FOLDER_KEY); + new EditorPreferenceString(LAST_TARGET_SCRIPTS_FOLDER_KEY, null, true); private static readonly EditorPreferenceString LastGeneratedCollectionScriptPath = - new EditorPreferenceString(LAST_GENERATED_COLLECTION_SCRIPT_PATH_KEY); + new EditorPreferenceString(LAST_GENERATED_COLLECTION_SCRIPT_PATH_KEY, null, true); private static readonly EditorPreferenceBool CreateFolderForThisCollection = - new EditorPreferenceBool(CREATE_FOLDER_FOR_THIS_COLLECTION_KEY); + new EditorPreferenceBool(CREATE_FOLDER_FOR_THIS_COLLECTION_KEY, false, true); private static readonly EditorPreferenceBool CreateFolderForThisCollectionScripts = - new EditorPreferenceBool(CREATE_FOLDER_FOR_THIS_COLLECTION_SCRIPTS_KEY); + new EditorPreferenceBool(CREATE_FOLDER_FOR_THIS_COLLECTION_SCRIPTS_KEY, false, true); private static readonly EditorPreferenceString CollectionFormat = - new EditorPreferenceString(COLLECTION_FORMAT_KEY, COLLECTION_FORMAT_DEFAULT); + new EditorPreferenceString(COLLECTION_FORMAT_KEY, COLLECTION_FORMAT_DEFAULT, true); private string cachedCollectionName = COLLECTION_NAME_DEFAULT; private string CollectionName diff --git a/Scripts/Runtime/Utils/AssetDatabaseUtils.cs b/Scripts/Runtime/Utils/AssetDatabaseUtils.cs index c86d141..90caf55 100644 --- a/Scripts/Runtime/Utils/AssetDatabaseUtils.cs +++ b/Scripts/Runtime/Utils/AssetDatabaseUtils.cs @@ -21,8 +21,8 @@ public static void CreatePathIfDontExist(string targetPath) public static void RenameAsset(Object targetObject, string newName) { #if UNITY_EDITOR - targetObject.name = newName; UnityEditor.AssetDatabase.RenameAsset(UnityEditor.AssetDatabase.GetAssetPath(targetObject), newName); + targetObject.name = newName; ObjectUtility.SetDirty(targetObject); #endif } diff --git a/package.json b/package.json index 68a8fc9..9962739 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.brunomikoski.scriptableobjectcollection", "displayName": "Scriptable Object Collection", - "version": "1.9.1", + "version": "1.9.2", "unity": "2018.4", "description": "A library to help improve the usability of Unity3D Scriptable Objects by grouping then into a collection and exposing then by code or nice inspectors!", "keywords": [