You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This resolves an issue discovered after peer review where using just `HasAuthority` as part of the check within `NetworkList.OnSpawned` while using a distributed authority topology and spawning with ownership (i.e. Client-A spawns with ownership where Client-B is the owner) would result in any changes made on the authority side during spawn would not be synchronized.
The solution was to add `NetworkObject.IsSpawnAuthority` (internal) that is only set on the spawn authority side (i.e. the side that generates the `CreateObjectMessage`).
Debug.LogError("Spawning NetworkObjects with nested NetworkObjects is only supported for scene objects. Child NetworkObjects will not be spawned over the network!");
errorLog.Append($"[Client-{networkManager.LocalClientId}] List component has the incorrect number of items. Expected: {SpawnCount}, Have: {listComponent.TheList.Count}");
430
+
errorLog.Append($"[Client-{networkManager.LocalClientId}] List component has the incorrect number of items. Expected: {ValueCount}, Have: {listComponent.TheList.Count}");
406
431
returnfalse;
407
432
}
408
433
409
-
for(inti=0;i<SpawnCount;i++)
434
+
for(inti=0;i<ValueCount;i++)
410
435
{
411
436
varactual=listComponent.OwnerWriteList[i];
412
-
varexpected=m_ExpectedValues[i];
437
+
varexpected=OwnerWriteExpectedValues[i];
413
438
if(expected!=actual)
414
439
{
415
440
errorLog.Append($"[Client-{networkManager.LocalClientId}] Incorrect value at index {i}, expected: {expected}, actual: {actual}");
@@ -450,9 +475,9 @@ public override void OnNetworkSpawn()
0 commit comments