public class Editor.Window : Editor.Widget
Related Guides
Broader workflow and conceptual references connected to this API.
Editor Apps are apps that run in the editor. They generally have their own window. They're sometimes used to edit specific types of asset.
When creating a Tool or Editor Project, it's common to want to be able to trigger certain actions with a key press or combined keystroke (Like O to enter Object Mode, or SHIFT+B to enter the Block Tool).
You can create your own editor tool to help you create your game. Your tool needs to be created in an editor project.
Editor UI is built entirely out of Widgets. Widgets are different from Panels, which are used for in-game UI. Widgets can be various elements or components, such as labels, buttons, text boxes, trees, or images.
To add Terrain to your Scene, right click in the Hierarchy and select 3D Object → Terrain from the menu. The Terrain inspector will then prompt you to create, import or link an existing Terrain asset.
You can define your own custom asset types as GameResources. They give you a nice inspector window and they're hotloaded in-game, which means you can whip things up pretty quickly if you're using them.
Constructors
Showing 1 constructors
No results match this filter.
Methods
Showing 15 methods
public void AddToolBar(Editor.ToolBar bar, Editor.ToolbarPosition position = 4)
Parameters
position: Default: 4
public void Center()
Position the window at the centre of the screen, or main editor window if one is present.
public void Clear()
TODO this was a test, get rid of it
public virtual void Close()
protected virtual void OnBlur(Editor.FocusChangeReason reason)
protected virtual void OnClosed()
protected virtual void OnResize()
public void RemoveToolBar(Editor.ToolBar bar)
public virtual void RestoreFromStateCookie()
Called whenever the window should restore its state via the EditorCookie library, that was previously saved in `Editor.Window.SaveToStateCookie`. You should use `Editor.Window.StateCookie` in the cookie name.
public void RestoreState(string state)
public string SaveState(int version = 0)
Parameters
version: Default: 0
public virtual void SaveToStateCookie()
Called whenever the window should save its state via the EditorCookie library, to be later restored in `Editor.Window.RestoreFromStateCookie`. This is useful to carry data across game sessions. You should use `Editor.Window.StateCookie` in the cookie name.
public virtual void Show()
No results match this filter.
Properties
Showing 9 properties
public bool Editor.Window.CloseButtonVisible { get; set; }
public bool Editor.Window.IsDialog { get; set; }
public bool Editor.Window.StartCentered { get; set; }
Initialises the window at the centre of the screen (or main editor window if one is present) by default.
public string Editor.Window.StateCookie { get; set; }
A unique identifier for this window, to store the window state across sessions using the Cookie library.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Editor |
| Type | class |
| Assembly | Sandbox.Tools |
| Doc ID | T:Editor.Window |