diff --git a/Editor/CustomEditors/MultiEditor.cs b/Editor/CustomEditors/MultiEditor.cs index ddeaf07..5138238 100644 --- a/Editor/CustomEditors/MultiEditor.cs +++ b/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++) diff --git a/package.json b/package.json index 22f2a0f..1324a03 100644 --- a/package.json +++ b/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": {