Add: AlchemyEditorWindow

This commit is contained in:
AnnulusGames 2024-02-17 18:29:41 +09:00
parent 787d4b7388
commit f1a8533c82
2 changed files with 33 additions and 0 deletions

View 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);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 03f5997e2822949b0bbe12ee0a4ab1f6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: