Skip to content

Commit

Permalink
Merge pull request #50 from techno-dwarf-works/feature/refactoring
Browse files Browse the repository at this point in the history
Version 0.0.47
  • Loading branch information
uurha committed Sep 1, 2024
1 parent b354f75 commit f1f007a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion Editor/CustomEditors/MultiEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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<MultiEditor>();
m.SetOverrideDefault(false);
var container = new VisualElement();

for (var i = 0; i < _preEditors.Count; i++)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit f1f007a

Please sign in to comment.