Documentation

Unity Engine

Download Unity

Unity Engine

CreateGUI()

CreateGUI is called when the EditorWindow's rootVisualElement is ready to be populated.
Read time 1 minuteLast updated 8 days ago

Definition

public void CreateGUI()

Remarks

Use
CreateGUI
to add UI Toolkit UI elements to your window.
When creating a custom Editor window, follow these guidelines:
It's important to note that
CreateGUI
might not be called before the first call to EditorWindow.Update(). For more information, refer to EditorWindow.
For an example on how to create an Editor window to react to user input, refer to Create a custom Editor window with C# script.

Examples

{code Modules/UIElements/Tests/UIElementsExamples/Assets/EditorWindowCodeExamples/MouseOverWindowExample.cs}