From 08585c7379fdd038a0d7752c94dda0f9d247725a Mon Sep 17 00:00:00 2001 From: James Frowen Date: Sun, 11 Oct 2020 22:45:48 +0100 Subject: [PATCH] Update NetworkIdentity.cs checking cache instead of property --- Assets/Mirror/Runtime/NetworkIdentity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Runtime/NetworkIdentity.cs b/Assets/Mirror/Runtime/NetworkIdentity.cs index 77800e23a..a4a2fde1c 100644 --- a/Assets/Mirror/Runtime/NetworkIdentity.cs +++ b/Assets/Mirror/Runtime/NetworkIdentity.cs @@ -242,7 +242,7 @@ public NetworkBehaviour[] NetworkBehaviours void CreateNetworkBehavioursCache() { networkBehavioursCache = GetComponents(); - if (NetworkBehaviours.Length > 64) + if (networkBehavioursCache.Length > 64) { Debug.LogError($"Only 64 NetworkBehaviour components are allowed for NetworkIdentity: {name} because of the dirtyComponentMask", this); // Log error once then resize array so that NetworkIdentity does not throw exceptions later