Skip to content

Commit 992cc49

Browse files
committed
fix: NetworkConfig CreatePlayerPrefab default value
1 parent ece4ee3 commit 992cc49

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

MLAPI/Configuration/NetworkConfig.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using UnityEngine;
44
using System.Linq;
@@ -53,7 +53,7 @@ public class NetworkConfig
5353
/// Whether or not a player object should be created by default. This value can be overriden on a case by case basis with ConnectionApproval.
5454
/// </summary>
5555
[Tooltip("Whether or not a player object should be created by default. This value can be overriden on a case by case basis with ConnectionApproval.")]
56-
public bool CreatePlayerPrefab;
56+
public bool CreatePlayerPrefab = true;
5757
/// <summary>
5858
/// Amount of times per second the receive queue is emptied and all messages inside are processed.
5959
/// </summary>
@@ -74,7 +74,7 @@ public class NetworkConfig
7474
/// This is useful to prevent the MLAPI from hanging a frame
7575
/// Set this to less than or equal to 0 for unlimited
7676
/// </summary>
77-
[FormerlySerializedAs("MaxBehaviourUpdatesPerTick")]
77+
[FormerlySerializedAs("MaxBehaviourUpdatesPerTick")]
7878
[Tooltip("The maximum amount of NetworkedObject SyncedVars to process per Event tick. This is to prevent freezing")]
7979
public int MaxObjectUpdatesPerTick = -1;
8080
/// <summary>
@@ -119,7 +119,7 @@ public class NetworkConfig
119119
[Tooltip("Ensures that NetworkedVars can be read even if a client accidental writes where its not allowed to. This will cost some CPU time and bandwidth")]
120120
public bool EnsureNetworkedVarLengthSafety = false;
121121
/// <summary>
122-
/// Whether or not the MLAPI should check for differences in the prefabs at connection.
122+
/// Whether or not the MLAPI should check for differences in the prefabs at connection.
123123
/// If you dynamically add prefabs at runtime, turn this OFF
124124
/// </summary>
125125
[Tooltip("Whether or not the MLAPI should check for differences in the prefab lists at connection")]
@@ -216,7 +216,7 @@ public string ToBase64()
216216
writer.WriteUInt16Packed(config.ProtocolVersion);
217217

218218
writer.WriteUInt16Packed((ushort)config.RegisteredScenes.Count);
219-
219+
220220
for (int i = 0; i < config.RegisteredScenes.Count; i++)
221221
{
222222
writer.WriteString(config.RegisteredScenes[i]);
@@ -246,7 +246,7 @@ public string ToBase64()
246246
}
247247
}
248248
}
249-
249+
250250
/// <summary>
251251
/// Sets the NetworkConfig data with that from a base64 encoded version
252252
/// </summary>
@@ -263,7 +263,7 @@ public void FromBase64(string base64)
263263

264264
ushort sceneCount = reader.ReadUInt16Packed();
265265
config.RegisteredScenes.Clear();
266-
266+
267267
for (int i = 0; i < sceneCount; i++)
268268
{
269269
config.RegisteredScenes.Add(reader.ReadString().ToString());
@@ -290,7 +290,7 @@ public void FromBase64(string base64)
290290
}
291291
}
292292
}
293-
293+
294294

295295
private ulong? ConfigHash = null;
296296
/// <summary>

0 commit comments

Comments
 (0)