Fixed critial SyncVar issue where array length would be checked before array was created
This commit is contained in:
parent
a793dc6fad
commit
cf34bc3313
@ -302,11 +302,11 @@ namespace MLAPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(dirtyFields.Length > 255)
|
dirtyFields = new bool[syncedFields.Count];
|
||||||
|
if (dirtyFields.Length > 255)
|
||||||
{
|
{
|
||||||
Debug.LogError("MLAPI: You can not have more than 255 SyncVar's per NetworkedBehaviour!");
|
Debug.LogError("MLAPI: You can not have more than 255 SyncVar's per NetworkedBehaviour!");
|
||||||
}
|
}
|
||||||
dirtyFields = new bool[syncedFields.Count];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void OnSyncVarUpdate(object value, byte fieldIndex)
|
internal void OnSyncVarUpdate(object value, byte fieldIndex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user