Custom Editor Window

I’m looking for a tutorial on making a custom editor window for my Unity Add-on I’m making. I looked at Unity - Scripting API: Editor.CreateEditor but don’t know what to put in as arguments and how to add content to the widow.

2 Answers

2

I don’t know how to use CreatEditor. But I use this this template for create editor windows.

class AdminEditorWindow extends EditorWindow {
	@MenuItem ("Game/Admin")
    static function Init () {
        var window = EditorWindow.GetWindow(AdminEditorWindow);
    	window.text = "nice";    
    }
    
    var text: String = "what?";
    
    function OnGUI () {
    	GUILayout.Label(text);
    }
}

How would I add buttons to the editor window? Do I use EditorGUI?

–

Never mind, I got it. Thanks A Lot!

–

Hey, you can check out the link below, it is a blog written by me related to “How to get started with editor window”.