mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkManager.OnValidate: no need to artificially limit max connections
This commit is contained in:
parent
430e6bc6a7
commit
8b151e71cf
@ -145,7 +145,7 @@ public virtual void OnApplicationQuit()
|
|||||||
// virtual so that inheriting classes' OnValidate() can call base.OnValidate() too
|
// virtual so that inheriting classes' OnValidate() can call base.OnValidate() too
|
||||||
public virtual void OnValidate()
|
public virtual void OnValidate()
|
||||||
{
|
{
|
||||||
maxConnections = Mathf.Clamp(maxConnections, 1, 32000); // [1, 32000]
|
maxConnections = Mathf.Max(maxConnections, 0); // always >= 0
|
||||||
|
|
||||||
if (playerPrefab != null && playerPrefab.GetComponent<NetworkIdentity>() == null)
|
if (playerPrefab != null && playerPrefab.GetComponent<NetworkIdentity>() == null)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user