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
Up-port of #4169.
The NetworkManager update registration is per-NetworkObject while the
authority motion model is per-NetworkTransform, so the first authority
instance to initialize removed the entire NetworkObject from the update
group and its non-authority siblings stopped being updated.
Gate the removal on whether any NetworkTransform on the NetworkObject is
still non-authority for that same update.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ Additional documentation and release notes are available at [Multiplayer Documen
18
18
19
19
### Fixed
20
20
21
+
- Issue with mixed authority nested `NetworkTransform` instances can stop child/nested `NetworkTransform` instances from updating due to a parent (root or otherwise) `NetworkTransform` that is the authority instance will remove the `NetworkObject` completely from the non-authority update group causing non-authority instances to never update their state (interpolating or not) on the authority side. (#4169)
/// Determines if this <see cref="NetworkObject"/> has any <see cref="NetworkTransform"/> instances that are non-authority and are updated during the same update stage.
3741
+
/// </summary>
3742
+
/// <remarks>
3743
+
/// See <see cref="InternalInitialization"/> to better understand how the <paramref name="forUpdate"/> parameter is used to determine which update stage to check for non-authority <see cref="NetworkTransform"/> instances.
3744
+
/// </remarks>
3745
+
/// <param name="forUpdate">true to check the instances updated during the standard update and false to check the instances updated during the fixed update.</param>
3746
+
/// <returns>true if a non-authority NetworkTransform exists on this NetworkObject and false if there are none.</returns>
// If there are no non-authority NetworkTransform instances on this NetworkObject using this update, then remove this instance from the NetworkManager's update list.
3843
+
// Otherwise, we need to keep it registered for updates so the non-authority instances will process their received state updates and apply them to the transform.
AssertOnTimeout($"Client-{newOwner.LocalClientId} never gained ownership of {instance.name}!");
55
+
56
+
// The new owner is the authority for the rigidbody driven root, so nothing on this instance needs the fixed
57
+
// update any longer. The server authoritative child still needs the standard update.
58
+
Assert.False(newOwner.NetworkTransformFixedUpdate.ContainsKey(instance.NetworkObjectId),$"Client-{newOwner.LocalClientId} is still registered for the fixed update!");
59
+
Assert.True(newOwner.NetworkTransformUpdate.ContainsKey(instance.NetworkObjectId),$"Client-{newOwner.LocalClientId} is not registered for the update!");
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Tests/Runtime/NetworkTransform/NetworkTransformMixedMotionModelTests.cs.meta
0 commit comments