Skip to content

Commit b3c889c

Browse files
fix: not sending all NetworkVariables (#2135)
* fix: not sending all NetworkVariables to all clients when a client connects to a server. (#1987) * fix This fixes the issue with some of the tests failing. Disabled the tests where clients don't have a prefab defined. * update Fixing issues with the last 5 tests. * update Got another (of the five) test working. Adding some helpers to assure the prefabs are spawned before trying to check them. Updated some comments. * test update This resolves the remaining issues with the deferred message tests for this PR. * test update I believe this will fix the tests having instability issues as well. Co-authored-by: NoelStephensUnity <73188597+NoelStephensUnity@users.noreply.github.com> Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
1 parent e28eb2a commit b3c889c

3 files changed

Lines changed: 303 additions & 104 deletions

File tree

com.unity.netcode.gameobjects/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
2424

2525
### Fixed
2626

27+
- Fixed not sending all NetworkVariables to all clients when a client connects to a server. (#1987)
2728
- Fixed an issue where reading/writing more than 8 bits at a time with BitReader/BitWriter would write/read from the wrong place, returning and incorrect result. (#2130)
2829
- Fixed issue with the internal `NetworkTransformState.m_Bitset` flag not getting cleared upon the next tick advancement. (#2110)
2930
- Fixed interpolation issue with `NetworkTransform.Teleport`. (#2110)

com.unity.netcode.gameobjects/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,6 @@ internal void SendSpawnCallForObject(ulong clientId, NetworkObject networkObject
575575
};
576576
var size = NetworkManager.SendMessage(ref message, NetworkDelivery.ReliableFragmentedSequenced, clientId);
577577
NetworkManager.NetworkMetrics.TrackObjectSpawnSent(clientId, networkObject, size);
578-
579-
networkObject.MarkVariablesDirty(true);
580578
}
581579

582580
internal ulong? GetSpawnParentId(NetworkObject networkObject)

0 commit comments

Comments
 (0)