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

# Class ksRoomType

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

Room types hold room configuration data. Room and player scripts can be attached to game objects with room types.

```csharp
[DisallowMultipleComponent]
[AddComponentMenu("Reactor/ksRoomType")]
public class ksRoomType : MonoBehaviour
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) â† Object â† Component â† Behaviour â† MonoBehaviour â† [ksRoomType](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.ksroomtype.md)

#### Inherited Members

MonoBehaviour.IsInvoking(), MonoBehaviour.CancelInvoke(), MonoBehaviour.Invoke(string, float), MonoBehaviour.InvokeRepeating(string, float, float), MonoBehaviour.CancelInvoke(string), MonoBehaviour.IsInvoking(string), MonoBehaviour.StartCoroutine(string), MonoBehaviour.StartCoroutine(string, object), MonoBehaviour.StartCoroutine(IEnumerator), MonoBehaviour.StartCoroutine\_Auto(IEnumerator), MonoBehaviour.StopCoroutine(IEnumerator), MonoBehaviour.StopCoroutine(Coroutine), MonoBehaviour.StopCoroutine(string), MonoBehaviour.StopAllCoroutines(), MonoBehaviour.print(object), MonoBehaviour.destroyCancellationToken, MonoBehaviour.useGUILayout, MonoBehaviour.runInEditMode, Behaviour.enabled, Behaviour.isActiveAndEnabled, Component.GetComponent(Type), Component.GetComponent\<T>(), Component.TryGetComponent(Type, out Component), Component.TryGetComponent\<T>(out T), Component.GetComponent(string), Component.GetComponentInChildren(Type, bool), Component.GetComponentInChildren(Type), Component.GetComponentInChildren\<T>(bool), Component.GetComponentInChildren\<T>(), Component.GetComponentsInChildren(Type, bool), Component.GetComponentsInChildren(Type), Component.GetComponentsInChildren\<T>(bool), Component.GetComponentsInChildren\<T>(bool, List\<T>), Component.GetComponentsInChildren\<T>(), Component.GetComponentsInChildren\<T>(List\<T>), Component.GetComponentInParent(Type, bool), Component.GetComponentInParent(Type), Component.GetComponentInParent\<T>(bool), Component.GetComponentInParent\<T>(), Component.GetComponentsInParent(Type, bool), Component.GetComponentsInParent(Type), Component.GetComponentsInParent\<T>(bool), Component.GetComponentsInParent\<T>(bool, List\<T>), Component.GetComponentsInParent\<T>(), Component.GetComponents(Type), Component.GetComponents(Type, List\<Component>), Component.GetComponents\<T>(List\<T>), Component.GetComponents\<T>(), Component.CompareTag(string), Component.SendMessageUpwards(string, object, SendMessageOptions), Component.SendMessageUpwards(string, object), Component.SendMessageUpwards(string), Component.SendMessageUpwards(string, SendMessageOptions), Component.SendMessage(string, object), Component.SendMessage(string), Component.SendMessage(string, object, SendMessageOptions), Component.SendMessage(string, SendMessageOptions), Component.BroadcastMessage(string, object, SendMessageOptions), Component.BroadcastMessage(string, object), Component.BroadcastMessage(string), Component.BroadcastMessage(string, SendMessageOptions), Component.transform, Component.gameObject, Component.tag, 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)

## Constructors

### ksRoomType() <a href="#ks_reactor_client_unity_ksroomtype__ctor" id="ks_reactor_client_unity_ksroomtype__ctor"></a>

```csharp
public ksRoomType()
```

## Fields

### TransformPrecisionOverrides <a href="#ks_reactor_client_unity_ksroomtype_transformprecisionoverrides" id="ks_reactor_client_unity_ksroomtype_transformprecisionoverrides"></a>

```csharp
[Tooltip("Override the precision used for all entities when syncing transform data from servers to clients.")]
public ksTransformPrecisions TransformPrecisionOverrides
```

#### Field Value

[ksTransformPrecisions](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.kstransformprecisions.md)

## Properties

### AllowPlayerSpawning <a href="#ks_reactor_client_unity_ksroomtype_allowplayerspawning" id="ks_reactor_client_unity_ksroomtype_allowplayerspawning"></a>

Are players allowed to spawn entities?

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

#### Property Value

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

### ApplyServerTimeScale <a href="#ks_reactor_client_unity_ksroomtype_applyservertimescale" id="ks_reactor_client_unity_ksroomtype_applyservertimescale"></a>

Apply time scaling received on server frames to the Unity time.

```csharp
public bool ApplyServerTimeScale { get; set; }
```

#### Property Value

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

### ClientSendRate <a href="#ks_reactor_client_unity_ksroomtype_clientsendrate" id="ks_reactor_client_unity_ksroomtype_clientsendrate"></a>

Number of times per second the client sends data to the server.

```csharp
public int ClientSendRate { get; set; }
```

#### Property Value

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

### ClusterReconnectAttempts <a href="#ks_reactor_client_unity_ksroomtype_clusterreconnectattempts" id="ks_reactor_client_unity_ksroomtype_clusterreconnectattempts"></a>

```csharp
public int ClusterReconnectAttempts { get; set; }
```

#### Property Value

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

### ClusterReconnectDelay <a href="#ks_reactor_client_unity_ksroomtype_clusterreconnectdelay" id="ks_reactor_client_unity_ksroomtype_clusterreconnectdelay"></a>

Number of seconds between cluster connection attempts.

```csharp
public byte ClusterReconnectDelay { get; set; }
```

#### Property Value

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

### DefaultEntityControllerPredictor <a href="#ks_reactor_client_unity_ksroomtype_defaultentitycontrollerpredictor" id="ks_reactor_client_unity_ksroomtype_defaultentitycontrollerpredictor"></a>

Default predictor for entities with player controllers that use input prediction.

```csharp
public ksPredictor DefaultEntityControllerPredictor { get; set; }
```

#### Property Value

[ksPredictor](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.kspredictor.md)

### DefaultEntityPredictor <a href="#ks_reactor_client_unity_ksroomtype_defaultentitypredictor" id="ks_reactor_client_unity_ksroomtype_defaultentitypredictor"></a>

Default predictor for entities that do not use input prediction.

```csharp
public ksPredictor DefaultEntityPredictor { get; set; }
```

#### Property Value

[ksPredictor](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.kspredictor.md)

### DefaultPlayerPredictor <a href="#ks_reactor_client_unity_ksroomtype_defaultplayerpredictor" id="ks_reactor_client_unity_ksroomtype_defaultplayerpredictor"></a>

Default predictor for player properties.

```csharp
public ksPredictor DefaultPlayerPredictor { get; set; }
```

#### Property Value

[ksPredictor](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.kspredictor.md)

### DefaultRoomPredictor <a href="#ks_reactor_client_unity_ksroomtype_defaultroompredictor" id="ks_reactor_client_unity_ksroomtype_defaultroompredictor"></a>

Default predictor for room properties.

```csharp
public ksPredictor DefaultRoomPredictor { get; set; }
```

#### Property Value

[ksPredictor](/reactor/api-reference/ks.reactor.client.unity/ks.reactor.client.unity.kspredictor.md)

### EnableUDPClientFrames <a href="#ks_reactor_client_unity_ksroomtype_enableudpclientframes" id="ks_reactor_client_unity_ksroomtype_enableudpclientframes"></a>

When enabled client timing and owned entity state will be sent using UDP.

```csharp
public bool EnableUDPClientFrames { get; set; }
```

#### Property Value

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

### EncodingThreads <a href="#ks_reactor_client_unity_ksroomtype_encodingthreads" id="ks_reactor_client_unity_ksroomtype_encodingthreads"></a>

```csharp
public int EncodingThreads { get; }
```

#### Property Value

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

### LocalServerPort <a href="#ks_reactor_client_unity_ksroomtype_localserverport" id="ks_reactor_client_unity_ksroomtype_localserverport"></a>

Port to use for local server.

```csharp
public ushort LocalServerPort { get; set; }
```

#### Property Value

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

### MaxConcurrentAuthentications <a href="#ks_reactor_client_unity_ksroomtype_maxconcurrentauthentications" id="ks_reactor_client_unity_ksroomtype_maxconcurrentauthentications"></a>

Max number of concurrent authentications. 0 for unlimited.

```csharp
public int MaxConcurrentAuthentications { get; }
```

#### Property Value

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

### NetworkSyncRate <a href="#ks_reactor_client_unity_ksroomtype_networksyncrate" id="ks_reactor_client_unity_ksroomtype_networksyncrate"></a>

Network updates sent from the server to all clients per second. This is calculated from [ServerFrameRate](#KS_Reactor_Client_Unity_ksRoomType_ServerFrameRate) and [ServerFramesPerSync](#KS_Reactor_Client_Unity_ksRoomType_ServerFramesPerSync).

```csharp
public float NetworkSyncRate { get; }
```

#### Property Value

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

### NetworkThreads <a href="#ks_reactor_client_unity_ksroomtype_networkthreads" id="ks_reactor_client_unity_ksroomtype_networkthreads"></a>

```csharp
public int NetworkThreads { get; }
```

#### Property Value

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

### ParallelControllerUpdates <a href="#ks_reactor_client_unity_ksroomtype_parallelcontrollerupdates" id="ks_reactor_client_unity_ksroomtype_parallelcontrollerupdates"></a>

When true, player controllers update use multithreading to update in parallel.

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

#### Property Value

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

### ParallelOwnedEntityUpdates <a href="#ks_reactor_client_unity_ksroomtype_parallelownedentityupdates" id="ks_reactor_client_unity_ksroomtype_parallelownedentityupdates"></a>

When true, entity transform and property updates for client-owned entities are applied in parallel on the server using multithreading.

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

#### Property Value

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

### PhysicsThreads <a href="#ks_reactor_client_unity_ksroomtype_physicsthreads" id="ks_reactor_client_unity_ksroomtype_physicsthreads"></a>

```csharp
public int PhysicsThreads { get; }
```

#### Property Value

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

### PlayerLimit <a href="#ks_reactor_client_unity_ksroomtype_playerlimit" id="ks_reactor_client_unity_ksroomtype_playerlimit"></a>

Player limit

```csharp
public uint PlayerLimit { get; set; }
```

#### Property Value

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

### PlayersVisible <a href="#ks_reactor_client_unity_ksroomtype_playersvisible" id="ks_reactor_client_unity_ksroomtype_playersvisible"></a>

Is player data synced? You can override this per-player by setting ksIServerPlayer.IsVisible.

```csharp
public bool PlayersVisible { get; set; }
```

#### Property Value

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

### RecoverUpdateTime <a href="#ks_reactor_client_unity_ksroomtype_recoverupdatetime" id="ks_reactor_client_unity_ksroomtype_recoverupdatetime"></a>

Try to recover lost update time

```csharp
public bool RecoverUpdateTime { get; set; }
```

#### Property Value

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

### RequiredCoreCount <a href="#ks_reactor_client_unity_ksroomtype_requiredcorecount" id="ks_reactor_client_unity_ksroomtype_requiredcorecount"></a>

```csharp
public float RequiredCoreCount { get; set; }
```

#### Property Value

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

### RequiredMemory <a href="#ks_reactor_client_unity_ksroomtype_requiredmemory" id="ks_reactor_client_unity_ksroomtype_requiredmemory"></a>

```csharp
public float RequiredMemory { get; set; }
```

#### Property Value

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

### ServerFrameRate <a href="#ks_reactor_client_unity_ksroomtype_serverframerate" id="ks_reactor_client_unity_ksroomtype_serverframerate"></a>

Number of server frame updates per second.

```csharp
public int ServerFrameRate { get; set; }
```

#### Property Value

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

### ServerFramesPerSync <a href="#ks_reactor_client_unity_ksroomtype_serverframespersync" id="ks_reactor_client_unity_ksroomtype_serverframespersync"></a>

Number of server frames per network update set from the server to all clients. Eg. if this is two, the server will send a network update every second frame.

```csharp
public int ServerFramesPerSync { get; set; }
```

#### Property Value

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

## Methods

### GetRoomInfo(string, ushort) <a href="#ks_reactor_client_unity_ksroomtype_getroominfo_system_string_system_uint16" id="ks_reactor_client_unity_ksroomtype_getroominfo_system_string_system_uint16"></a>

Gets room info for connecting to a room of this type on localhost.

```csharp
public ksRoomInfo GetRoomInfo(string host = "127.0.0.1", ushort port = 0)
```

#### Parameters

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

Host to connect to

`port` [ushort](https://learn.microsoft.com/dotnet/api/system.uint16)

Port to connect to. If zero, [LocalServerPort](#KS_Reactor_Client_Unity_ksRoomType_LocalServerPort) is used.

#### Returns

[ksRoomInfo](/reactor/api-reference/ks.reactor/ks.reactor.ksroominfo.md)

Connection info

### IsLocalServerRunning() <a href="#ks_reactor_client_unity_ksroomtype_islocalserverrunning" id="ks_reactor_client_unity_ksroomtype_islocalserverrunning"></a>

Checks if a local server is running this room type. This can only detect local servers started through Unity and can only be used in the editor.

```csharp
public bool IsLocalServerRunning()
```

#### Returns

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

true if a local server is running this room type.
