diff --git a/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs b/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs new file mode 100644 index 0000000..3b4f544 --- /dev/null +++ b/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs @@ -0,0 +1,22 @@ +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine.UIElements; + +namespace Alchemy.Editor +{ + public abstract class AlchemyEditorWindow : EditorWindow + { + protected virtual void CreateGUI() + { + var windowElement = new VisualElement(); + var serializedObject = new SerializedObject(this); + InspectorHelper.BuildElements(serializedObject, windowElement, this, name => serializedObject.FindProperty(name), 0); + windowElement.Bind(serializedObject); + + // Remove "Serialized Data Model Controller" field + windowElement.hierarchy.RemoveAt(0); + + rootVisualElement.Add(windowElement); + } + } +} \ No newline at end of file diff --git a/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs.meta b/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs.meta new file mode 100644 index 0000000..a1dd6dc --- /dev/null +++ b/Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 03f5997e2822949b0bbe12ee0a4ab1f6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: