> 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.ksbaseloginmenu-1.md).

# Class ksBaseLoginMenu\<T>

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

Kinematicsoup Service Login GUI

```csharp
public abstract class ksBaseLoginMenu<T> : ScriptableObject where T : ScriptableObject, ksIMenu
```

#### Type Parameters

`T`

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← Object ← ScriptableObject ← [ksBaseLoginMenu\<T>](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksbaseloginmenu-1.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)

## Fields

### m\_consoleUrl <a href="#ks_unity_editor_ksbaseloginmenu_1_m_consoleurl" id="ks_unity_editor_ksbaseloginmenu_1_m_consoleurl"></a>

```csharp
protected string m_consoleUrl
```

#### Field Value

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

### m\_email <a href="#ks_unity_editor_ksbaseloginmenu_1_m_email" id="ks_unity_editor_ksbaseloginmenu_1_m_email"></a>

```csharp
protected string m_email
```

#### Field Value

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

### m\_password <a href="#ks_unity_editor_ksbaseloginmenu_1_m_password" id="ks_unity_editor_ksbaseloginmenu_1_m_password"></a>

```csharp
protected string m_password
```

#### Field Value

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

### m\_window <a href="#ks_unity_editor_ksbaseloginmenu_1_m_window" id="ks_unity_editor_ksbaseloginmenu_1_m_window"></a>

```csharp
protected ksWindow m_window
```

#### Field Value

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

## Properties

### ConsoleURL <a href="#ks_unity_editor_ksbaseloginmenu_1_consoleurl" id="ks_unity_editor_ksbaseloginmenu_1_consoleurl"></a>

Get the console url

```csharp
protected abstract string ConsoleURL { get; }
```

#### Property Value

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

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

Destroy this menu on close.

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

#### Property Value

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

### Instance <a href="#ks_unity_editor_ksbaseloginmenu_1_instance" id="ks_unity_editor_ksbaseloginmenu_1_instance"></a>

Singleton Instance

```csharp
public static T Instance { get; }
```

#### Property Value

T

## Methods

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

Creates the GUI.

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

#### Parameters

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

window the GUI is for.

### DrawFooter() <a href="#ks_unity_editor_ksbaseloginmenu_1_drawfooter" id="ks_unity_editor_ksbaseloginmenu_1_drawfooter"></a>

Derived classes can implement this to draw a footer. The default implementation does nothing.

```csharp
protected virtual void DrawFooter()
```

### DrawPasswordField(Rect) <a href="#ks_unity_editor_ksbaseloginmenu_1_drawpasswordfield_unityengine_rect" id="ks_unity_editor_ksbaseloginmenu_1_drawpasswordfield_unityengine_rect"></a>

Draw the password field.

```csharp
protected virtual void DrawPasswordField(Rect rect)
```

#### Parameters

`rect` Rect

password field bounds

### GetNextMenu(ksWindow) <a href="#ks_unity_editor_ksbaseloginmenu_1_getnextmenu_ks_unity_editor_kswindow" id="ks_unity_editor_ksbaseloginmenu_1_getnextmenu_ks_unity_editor_kswindow"></a>

Get the menu to show when the user is logged in.

```csharp
protected abstract ksAuthenticatedMenu GetNextMenu(ksWindow window)
```

#### Parameters

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

#### Returns

[ksAuthenticatedMenu](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksauthenticatedmenu.md)

Menu to show when the user is logged in.

### Login() <a href="#ks_unity_editor_ksbaseloginmenu_1_login" id="ks_unity_editor_ksbaseloginmenu_1_login"></a>

Send a login request

```csharp
protected abstract void Login()
```

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

Clear the password when the menu is closed if the password is not saved.

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

#### Parameters

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

window that closed the menu.

### OnLogin(ksJSON, string) <a href="#ks_unity_editor_ksbaseloginmenu_1_onlogin_ks_reactor_ksjson_system_string" id="ks_unity_editor_ksbaseloginmenu_1_onlogin_ks_reactor_ksjson_system_string"></a>

Handle a login response

```csharp
protected void OnLogin(ksJSON response, string error)
```

#### Parameters

`response` [ksJSON](/reactor/api-reference/ks.reactor/ks.reactor.ksjson.md)

response data

`error` [string](https://learn.microsoft.com/dotnet/api/system.string)

error message

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

Called when the menu is opened.

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

#### Parameters

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

window that opened the menu.

### RegisterClicked() <a href="#ks_unity_editor_ksbaseloginmenu_1_registerclicked" id="ks_unity_editor_ksbaseloginmenu_1_registerclicked"></a>

Called when the user clicks the Register link. Derived classes can implement this. The default implementation does nothing. Derived classes that implement this should not open a URL here as that is done automatically in the base class.

```csharp
protected virtual void RegisterClicked()
```
