Skip to content
Discussion options

You must be logged in to vote

There is no built-in solution, but you can add a simple script and all windows inherited from this script will be able to use attributes

TriEditorWindow.cs

[TriInspector.HideMonoScript]
public class TriEditorWindow : UnityEditor.EditorWindow
{
    private UnityEditor.Editor _editor;
    private void OnEnable() => _editor = UnityEditor.Editor.CreateEditor(this);
    private void OnDisable() => DestroyImmediate(_editor);
    private void OnGUI() => _editor.OnInspectorGUI();
}

MyEditorWindow.cs

using TriInspector;
using UnityEditor;
using UnityEngine;

[DeclareBoxGroup("Demo")]
public class MyEditorWindow : TriEditorWindow
{
    [MenuItem("Tools/My Window")]
    public static void Open() => G…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by EvgeniySerdiuk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants