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
{{ message }}
Repository navigation
Commit 23014fe
Browse filesBrowse the repository at this point in the historyBrowse files
fix: Prevent UseUnreliableDeltas from being used with SwitchTransformSpaceWhenParented (#3875)
* fix
Prevent user from selecting use unreliable deltas when SwitchTransformSpaceWhenParented is enabled (and vice versa).
Adding check during runtime to also notify the user that this combination does not work (i.e. missed updates can result in a missed transform update when parenting changes).
* update
Updating XML API to reflect the changes.
* update
Updating documentation.
* update
Adding changelog entry.
Removing white space.
* update
Including the scenario where SwitchTransformSpaceWhenParented was set while UseUnreliableDeltas had already been set.
* style
Fixing warning message grammar.
* update
Including NetworkTransform and the name in the warning logged when trying to set one or the other while either one is set.
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
18
18
19
19
### Fixed
20
20
21
+
- Fixed `NetworkTransform` issue where a user could enable UseUnreliableDeltas while SwitchTransformSpaceWhenParented was also enabled (and vice versa). (#3875)
21
22
- Fixed issue where `NetworkVariable` was not properly synchronizing to changes made by the spawn and write authority during `OnNetworkSpawn` and `OnNetworkPostSpawn`. (#3878)
22
23
- Fixed issue where `NetworkManager` was not cleaning itself up if an exception was thrown while starting. (#3864)
23
24
- Prevented a `NullReferenceException` in `UnityTransport` when using a custom `INetworkStreamDriverConstructor` that doesn't use all the default pipelines and the multiplayer tools package is installed. (#3853)
Copy file name to clipboardExpand all lines: com.unity.netcode.gameobjects/Documentation~/components/helper/networktransform.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,9 @@ The following NetworkTransform properties can cause a full state update when cha
75
75
-__Use Quaternion Compression__
76
76
-__Use Half Float Precision__
77
77
78
+
> [!NOTE]
79
+
> **UseUnreliableDeltas** cannot be enabled if **SwitchTransformSpaceWhenParented** is enabled since **SwitchTransformSpaceWhenParented** requires deltas to be sent reliably.
@@ -180,6 +183,7 @@ To resolve this issue, you can enable the __Switch Transform Space When Parented
180
183
Things to consider when using __Switch Transform Space When Parented__:
181
184
182
185
- This property is synchronized by the authority instance. If you disable it on the authority instance then it will synchronize this adjustment on all non-authority instances.
186
+
- This property cannot be enabled when **UseUnreliableDeltas** is enabled as it requires deltas to be sent reliably.
183
187
- When using __Switch Transform Space When Parented__, it's best to not make adjustments to the __NetworkTransform.InLocalSpace__ field and let the NetworkTransform handle this for you.
184
188
- While you can still change __In Local Space__ directly via script while __Switch Transform Space When Parented__ is enabled, this could impact the end results. It is recommended to not adjust __In Local Space__ when __Switch Transform Space When Parented__ is enabled.
/// When de-parented: Automatically transitions into world space and coverts any pending interpolation states to the relative local space on non-authority instances.<br />
1571
1572
/// </summary>
1572
1573
/// <remarks>
1574
+
/// Cannot be used if <see cref="UseUnreliableDeltas"/> is enabled. <br />
1573
1575
/// Only works with <see cref="NetworkTransform"/> components that are not paired with a <see cref="NetworkRigidbody"/> or <see cref="NetworkRigidbody2D"/> component that is configured to use the rigid body for motion.<br />
1574
1576
/// <see cref="TickSyncChildren"/> will automatically be set when this is enabled.
1575
1577
/// This field is auto-synchronized with non-authority clients when changed by the authority instance.
NetworkLog.LogWarning($"[{nameof(NetworkTransform)}][{name}] Reverting {nameof(UseUnreliableDeltas)} back to false as it cannot be enabled while {nameof(SwitchTransformSpaceWhenParented)} is enabled!");
1972
+
}
1973
+
UseUnreliableDeltas=false;
1974
+
}
1975
+
else// Otherwise SwitchTransformSpaceWhenParented has changed while UseUnreliableDeltas was already set.
NetworkLog.LogWarning($"[{nameof(NetworkTransform)}][{name}] Reverting {nameof(SwitchTransformSpaceWhenParented)} back to false as it cannot be enabled while {nameof(UseUnreliableDeltas)} is enabled!");
1980
+
}
1981
+
SwitchTransformSpaceWhenParented=false;
1982
+
}
1983
+
}
1984
+
1961
1985
// If the transform has deltas (returns dirty) or if an explicitly set state is pending
0 commit comments