21 lines
589 B
C#
21 lines
589 B
C#
using UnityEditor;
|
|
using UnityEngine.UIElements;
|
|
|
|
namespace RPGCoreCommon.Settings.Editor
|
|
{
|
|
[CustomEditor(typeof(MainSettingsSO))]
|
|
internal class MainSettingsSODrawer : UnityEditor.Editor
|
|
{
|
|
public override VisualElement CreateInspectorGUI()
|
|
{
|
|
var rootElement = new VisualElement();
|
|
|
|
var button = new Button();
|
|
button.text = "Open settings editor";
|
|
button.clicked += SettingsEditorWindow.ShowSettingsEditor;
|
|
|
|
rootElement.Add(button);
|
|
return rootElement;
|
|
}
|
|
}
|
|
} |