> 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.ksauthenticatedmenu.md).

# Class ksAuthenticatedMenu

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

Base class for menus that require users to be logged in.

```csharp
public class ksAuthenticatedMenu : ScriptableObject, ksIMenu
```

#### Inheritance

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

#### Derived

[ksPublishMenu](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.kspublishmenu.md), [ksServersMenu](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserversmenu.md)

#### Implements

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

#### Inherited Members

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)

## Properties

### DestroyOnClose <a href="#ks_unity_editor_ksauthenticatedmenu_destroyonclose" id="ks_unity_editor_ksauthenticatedmenu_destroyonclose"></a>

Session menus are destroyed on close

```csharp
public bool DestroyOnClose { get; }
```

#### Property Value

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

### Icon <a href="#ks_unity_editor_ksauthenticatedmenu_icon" id="ks_unity_editor_ksauthenticatedmenu_icon"></a>

Icon

```csharp
public virtual Texture Icon { get; }
```

#### Property Value

Texture

## Methods

### Draw(ksWindow) <a href="#ks_unity_editor_ksauthenticatedmenu_draw_ks_unity_editor_kswindow" id="ks_unity_editor_ksauthenticatedmenu_draw_ks_unity_editor_kswindow"></a>

Check the login state during layout events and redirect to the login menu if the user has not logged in.

```csharp
public void Draw(ksWindow window)
```

#### Parameters

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

gui window

### OnClose(ksWindow) <a href="#ks_unity_editor_ksauthenticatedmenu_onclose_ks_unity_editor_kswindow" id="ks_unity_editor_ksauthenticatedmenu_onclose_ks_unity_editor_kswindow"></a>

Called when the menu is closed.

```csharp
public virtual void OnClose(ksWindow window)
```

#### Parameters

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

gui window

### OnDraw(ksWindow) <a href="#ks_unity_editor_ksauthenticatedmenu_ondraw_ks_unity_editor_kswindow" id="ks_unity_editor_ksauthenticatedmenu_ondraw_ks_unity_editor_kswindow"></a>

Draws the GUI.

```csharp
public virtual void OnDraw(ksWindow window)
```

#### Parameters

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

gui window

### OnOpen(ksWindow) <a href="#ks_unity_editor_ksauthenticatedmenu_onopen_ks_unity_editor_kswindow" id="ks_unity_editor_ksauthenticatedmenu_onopen_ks_unity_editor_kswindow"></a>

Called when the menu is opened.

```csharp
public virtual void OnOpen(ksWindow window)
```

#### Parameters

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

gui window.

### SetLoginMenu(Type) <a href="#ks_unity_editor_ksauthenticatedmenu_setloginmenu_system_type" id="ks_unity_editor_ksauthenticatedmenu_setloginmenu_system_type"></a>

Set the required login menu

```csharp
protected void SetLoginMenu(Type loginMenuType)
```

#### Parameters

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

Menu type
