mirror of
https://github.com/AnnulusGames/Alchemy.git
synced 2025-01-22 08:18:51 -05:00
Add: AlchemyEditorWindow
This commit is contained in:
parent
787d4b7388
commit
f1a8533c82
22
Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs
Normal file
22
Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
11
Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs.meta
Normal file
11
Alchemy/Assets/Alchemy/Editor/AlchemyEditorWindow.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03f5997e2822949b0bbe12ee0a4ab1f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user