From a7db073f1cd7904129e056449d86352ffa7326e9 Mon Sep 17 00:00:00 2001 From: uurha Date: Sun, 1 Sep 2024 04:14:24 +0200 Subject: [PATCH 1/2] Update MultiEditor --- Assets/BetterCommons/Editor/CustomEditors/MultiEditor.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Assets/BetterCommons/Editor/CustomEditors/MultiEditor.cs b/Assets/BetterCommons/Editor/CustomEditors/MultiEditor.cs index ddeaf07..5138238 100644 --- a/Assets/BetterCommons/Editor/CustomEditors/MultiEditor.cs +++ b/Assets/BetterCommons/Editor/CustomEditors/MultiEditor.cs @@ -76,7 +76,7 @@ private void Iterate(IReadOnlyList<(Type type, MultiEditorAttribute)> extensions var (type, betterEditorAttribute) = extensions[index]; if (!_overrideDefault && betterEditorAttribute.OverrideDefaultEditor) { - _overrideDefault = true; + SetOverrideDefault(true); } var extension = (ExtendedEditor)Activator.CreateInstance(type, paramArray); @@ -92,8 +92,15 @@ private void Iterate(IReadOnlyList<(Type type, MultiEditorAttribute)> extensions } } + protected void SetOverrideDefault(bool value) + { + _overrideDefault = value; + } + public override VisualElement CreateInspectorGUI() { + var m = Editor.CreateInstance(); + m.SetOverrideDefault(false); var container = new VisualElement(); for (var i = 0; i < _preEditors.Count; i++) From c3c479cb27f6e261a5f1c6336d26d182ed5c3f40 Mon Sep 17 00:00:00 2001 From: uurha Date: Sun, 1 Sep 2024 04:14:32 +0200 Subject: [PATCH 2/2] Update package.json --- Assets/BetterCommons/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/BetterCommons/package.json b/Assets/BetterCommons/package.json index 22f2a0f..1324a03 100644 --- a/Assets/BetterCommons/package.json +++ b/Assets/BetterCommons/package.json @@ -1,7 +1,7 @@ { "name": "com.tdw.better.commons", "displayName": "Better Commons", - "version": "0.0.46", + "version": "0.0.47", "unity": "2021.3", "description": " ", "dependencies": {