We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d4cb9a commit f2c3662Copy full SHA for f2c3662
1 file changed
MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs
@@ -462,7 +462,13 @@ internal void SyncVarUpdate()
462
SetDirtyness();
463
if(Time.time - lastSyncTime >= SyncVarSyncDelay)
464
{
465
- byte dirtyCount = (byte)dirtyFields.Count(x => x == true);
+ byte dirtyCount = 0;
466
+ for (byte i = 0; i < dirtyFields.Length; i++)
467
+ {
468
+ if (dirtyFields[i])
469
+ dirtyCount++;
470
+ }
471
+
472
if (dirtyCount == 0)
473
return; //All up to date!
474
//It's sync time!
0 commit comments