> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md).

# Class ksWindow

Namespace: [KS.Unity.Editor](/reactor/api-reference/ks.unity.editor.md)\
Assembly: KSUnity-Editor.dll

Editor window the uses an interface to create the GUI. Swapping the interface allows for switching GUIs without having to create a new window for the new GUI.

```csharp
public class ksWindow : EditorWindow
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← Object ← ScriptableObject ← EditorWindow ← [ksWindow](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md)

#### Inherited Members

EditorWindow\.BeginWindows(), EditorWindow\.EndWindows(), EditorWindow\.ShowNotification(GUIContent), EditorWindow\.ShowNotification(GUIContent, double), EditorWindow\.RemoveNotification(), EditorWindow\.ShowTab(), EditorWindow\.Focus(), EditorWindow\.ShowUtility(), EditorWindow\.ShowPopup(), EditorWindow\.ShowModalUtility(), EditorWindow\.ShowAsDropDown(Rect, Vector2), EditorWindow\.Show(), EditorWindow\.Show(bool), EditorWindow\.ShowAuxWindow(), EditorWindow\.ShowModal(), EditorWindow\.GetWindow(Type, bool, string, bool), EditorWindow\.GetWindow(Type, bool, string), EditorWindow\.GetWindow(Type, bool), EditorWindow\.GetWindow(Type), EditorWindow\.GetWindowWithRect(Type, Rect, bool, string), EditorWindow\.GetWindowWithRect(Type, Rect, bool), EditorWindow\.GetWindowWithRect(Type, Rect), EditorWindow\.GetWindow\<T>(), EditorWindow\.GetWindow\<T>(bool), EditorWindow\.GetWindow\<T>(bool, string), EditorWindow\.GetWindow\<T>(string), EditorWindow\.GetWindow\<T>(string, bool), EditorWindow\.GetWindow\<T>(bool, string, bool), EditorWindow\.GetWindow\<T>(params Type\[]), EditorWindow\.GetWindow\<T>(string, params Type\[]), EditorWindow\.GetWindow\<T>(string, bool, params Type\[]), EditorWindow\.CreateWindow\<T>(params Type\[]), EditorWindow\.CreateWindow\<T>(string, params Type\[]), EditorWindow\.HasOpenInstances\<T>(), EditorWindow\.FocusWindowIfItsOpen(Type), EditorWindow\.FocusWindowIfItsOpen\<T>(), EditorWindow\.GetWindowWithRect\<T>(Rect), EditorWindow\.GetWindowWithRect\<T>(Rect, bool), EditorWindow\.GetWindowWithRect\<T>(Rect, bool, string), EditorWindow\.GetWindowWithRect\<T>(Rect, bool, string, bool), EditorWindow\.SaveChanges(), EditorWindow\.DiscardChanges(), EditorWindow\.Close(), EditorWindow\.Repaint(), EditorWindow\.SendEvent(Event), EditorWindow\.GetExtraPaneTypes(), EditorWindow\.TryGetOverlay(string, out Overlay), EditorWindow\.OnBackingScaleFactorChanged(), EditorWindow\.dataModeController, EditorWindow\.rootVisualElement, EditorWindow\.overlayCanvas, EditorWindow\.wantsMouseMove, EditorWindow\.wantsMouseEnterLeaveWindow, EditorWindow\.wantsLessLayoutEvents, EditorWindow\.autoRepaintOnSceneChange, EditorWindow\.maximized, EditorWindow\.hasFocus, EditorWindow\.docked, EditorWindow\.focusedWindow, EditorWindow\.mouseOverWindow, EditorWindow\.hasUnsavedChanges, EditorWindow\.saveChangesMessage, EditorWindow\.minSize, EditorWindow\.maxSize, EditorWindow\.title, EditorWindow\.titleContent, EditorWindow\.depthBufferBits, EditorWindow\.antiAlias, EditorWindow\.position, ScriptableObject.SetDirty(), ScriptableObject.CreateInstance(string), ScriptableObject.CreateInstance(Type), ScriptableObject.CreateInstance\<T>(), Object.GetInstanceID(), Object.GetHashCode(), Object.Equals(object), Object.Instantiate(Object, Vector3, Quaternion), Object.Instantiate(Object, Vector3, Quaternion, Transform), Object.Instantiate(Object), Object.Instantiate(Object, Transform), Object.Instantiate(Object, Transform, bool), Object.Instantiate\<T>(T), Object.Instantiate\<T>(T, Vector3, Quaternion), Object.Instantiate\<T>(T, Vector3, Quaternion, Transform), Object.Instantiate\<T>(T, Transform), Object.Instantiate\<T>(T, Transform, bool), Object.Destroy(Object, float), Object.Destroy(Object), Object.DestroyImmediate(Object, bool), Object.DestroyImmediate(Object), Object.FindObjectsOfType(Type), Object.FindObjectsOfType(Type, bool), Object.FindObjectsByType(Type, FindObjectsSortMode), Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode), Object.DontDestroyOnLoad(Object), Object.DestroyObject(Object, float), Object.DestroyObject(Object), Object.FindSceneObjectsOfType(Type), Object.FindObjectsOfTypeIncludingAssets(Type), Object.FindObjectsOfType\<T>(), Object.FindObjectsByType\<T>(FindObjectsSortMode), Object.FindObjectsOfType\<T>(bool), Object.FindObjectsByType\<T>(FindObjectsInactive, FindObjectsSortMode), Object.FindObjectOfType\<T>(), Object.FindObjectOfType\<T>(bool), Object.FindFirstObjectByType\<T>(), Object.FindAnyObjectByType\<T>(), Object.FindFirstObjectByType\<T>(FindObjectsInactive), Object.FindAnyObjectByType\<T>(FindObjectsInactive), Object.FindObjectsOfTypeAll(Type), Object.FindObjectOfType(Type), Object.FindFirstObjectByType(Type), Object.FindAnyObjectByType(Type), Object.FindObjectOfType(Type, bool), Object.FindFirstObjectByType(Type, FindObjectsInactive), Object.FindAnyObjectByType(Type, FindObjectsInactive), Object.ToString(), Object.name, Object.hideFlags, [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Fields

### REACTOR\_CONSOLE <a href="#ks_unity_editor_kswindow_reactor_console" id="ks_unity_editor_kswindow_reactor_console"></a>

```csharp
public const int REACTOR_CONSOLE = 102
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### REACTOR\_GETTING\_STARTED <a href="#ks_unity_editor_kswindow_reactor_getting_started" id="ks_unity_editor_kswindow_reactor_getting_started"></a>

```csharp
public const int REACTOR_GETTING_STARTED = 103
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### REACTOR\_PUBLISH <a href="#ks_unity_editor_kswindow_reactor_publish" id="ks_unity_editor_kswindow_reactor_publish"></a>

```csharp
public const int REACTOR_PUBLISH = 100
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### REACTOR\_SERVERS <a href="#ks_unity_editor_kswindow_reactor_servers" id="ks_unity_editor_kswindow_reactor_servers"></a>

```csharp
public const int REACTOR_SERVERS = 101
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### SCENE\_FUSION\_FEEDBACK <a href="#ks_unity_editor_kswindow_scene_fusion_feedback" id="ks_unity_editor_kswindow_scene_fusion_feedback"></a>

```csharp
public const int SCENE_FUSION_FEEDBACK = 2
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### SCENE\_FUSION\_MAIN <a href="#ks_unity_editor_kswindow_scene_fusion_main" id="ks_unity_editor_kswindow_scene_fusion_main"></a>

```csharp
public const int SCENE_FUSION_MAIN = 1
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

### SCENE\_FUSION\_SPLASHSCREEN <a href="#ks_unity_editor_kswindow_scene_fusion_splashscreen" id="ks_unity_editor_kswindow_scene_fusion_splashscreen"></a>

```csharp
public const int SCENE_FUSION_SPLASHSCREEN = 3
```

#### Field Value

[int](https://learn.microsoft.com/dotnet/api/system.int32)

## Properties

### Id <a href="#ks_unity_editor_kswindow_id" id="ks_unity_editor_kswindow_id"></a>

Window id

```csharp
public uint Id { get; }
```

#### Property Value

[uint](https://learn.microsoft.com/dotnet/api/system.uint32)

### Menu <a href="#ks_unity_editor_kswindow_menu" id="ks_unity_editor_kswindow_menu"></a>

Menu that provides the GUI.

```csharp
public ksIMenu Menu { get; set; }
```

#### Property Value

[ksIMenu](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksimenu.md)

## Methods

### Find(uint) <a href="#ks_unity_editor_kswindow_find_system_uint32" id="ks_unity_editor_kswindow_find_system_uint32"></a>

Gets a window by id. This is only safe to call after Unity deserialization finishes.

```csharp
public static ksWindow Find(uint id)
```

#### Parameters

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

id of window to get. Must be non-zero.

#### Returns

[ksWindow](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md)

window with the given id, or null if no window with the given id was found.

### Open(uint, CreateCallback, WindowStyle, bool) <a href="#ks_unity_editor_kswindow_open_system_uint32_ks_unity_editor_kswindow_createcallback_ks_unity_editor" id="ks_unity_editor_kswindow_open_system_uint32_ks_unity_editor_kswindow_createcallback_ks_unity_editor"></a>

Gets and opens a window by id. Creates the window if no window with the given id exists. This is only safe to call after Unity deserialization finishes.

```csharp
public static ksWindow Open(uint id, ksWindow.CreateCallback onCreate = null, ksWindow.WindowStyle style = WindowStyle.DEFAULT, bool focus = true)
```

#### Parameters

`id` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

id of window to open. Must be non-zero.

`onCreate` [ksWindow](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md).[CreateCallback](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow/ks.unity.editor.kswindow.createcallback.md)

callback to call if we create the window.

`style` [ksWindow](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md).[WindowStyle](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow/ks.unity.editor.kswindow.windowstyle.md)

`focus` [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

if true, the window will be focused.

#### Returns

[ksWindow](/reactor/api-reference/ks.unity.editor/ks.unity.editor.kswindow.md)

window with the given id, or null if id was 0.

### SetMenuType(uint, Type) <a href="#ks_unity_editor_kswindow_setmenutype_system_uint32_system_type" id="ks_unity_editor_kswindow_setmenutype_system_uint32_system_type"></a>

Set menu type.

```csharp
public static void SetMenuType(uint windowId, Type menuType)
```

#### Parameters

`windowId` [uint](https://learn.microsoft.com/dotnet/api/system.uint32)

id of the window to set menu type for.

`menuType` [Type](https://learn.microsoft.com/dotnet/api/system.type)
