> 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.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverlogmenu.md).

# Class ksServerLogMenu

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

Menu for displaying local server logs.

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

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← Object ← ScriptableObject ← [ksServerLogMenu](/reactor/api-reference/ks.reactor.client.unity.editor/ks.reactor.client.unity.editor.ksserverlogmenu.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_reactor_client_unity_editor_ksserverlogmenu_destroyonclose" id="ks_reactor_client_unity_editor_ksserverlogmenu_destroyonclose"></a>

Destroy the serialized object when closing the menu.

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

#### Property Value

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

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

Icon to display.

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

#### Property Value

Texture

## Methods

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

Draw the GUI.

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

#### Parameters

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

GUI window

### DrawLogMessage(ksWindow, GUIStyle, GUIContent, int, Rect) <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_drawlogmessage_ks_unity_editor_kswindow_unityengine_g" id="ks_reactor_client_unity_editor_ksserverlogmenu_drawlogmessage_ks_unity_editor_kswindow_unityengine_g"></a>

Draw and process events for log messages.

```csharp
public void DrawLogMessage(ksWindow window, GUIStyle style, GUIContent content, int messageIndex, Rect rect)
```

#### Parameters

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

Window

`style` GUIStyle

Draw style

`content` GUIContent

Draw content

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

Message index in the message list.

`rect` Rect

Draw region

### Initialize() <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_initialize" id="ks_reactor_client_unity_editor_ksserverlogmenu_initialize"></a>

Initialize GUI styles and log file list.

```csharp
public void Initialize()
```

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

Called when the menu is closed.

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

#### Parameters

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

GUI window

### OnOpen(ksWindow) <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_onopen_ks_unity_editor_kswindow" id="ks_reactor_client_unity_editor_ksserverlogmenu_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)

GUI window

### SelectLog(string) <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_selectlog_system_string" id="ks_reactor_client_unity_editor_ksserverlogmenu_selectlog_system_string"></a>

Update the log file list and set a new current log.

```csharp
public void SelectLog(string filename)
```

#### Parameters

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

file path

### Update() <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_update" id="ks_reactor_client_unity_editor_ksserverlogmenu_update"></a>

If the menu has been initialized then read the log messages from the current log file if the file size has changed.

```csharp
public void Update()
```

### UpdateFileList() <a href="#ks_reactor_client_unity_editor_ksserverlogmenu_updatefilelist" id="ks_reactor_client_unity_editor_ksserverlogmenu_updatefilelist"></a>

Rebuild the list of log files and match them to running local server instances.

```csharp
public void UpdateFileList()
```
