Commit aee018c
authored
fix: NetworkTransform initial synchronization, parenting, smooth transitions between transform spaces, and UI updates (#3013)
* fix
This fixes a synchronization issue with owner authoritative instances when running in client-server mode and parenting. When the server sends a parent sync message back with the position of the client's owned object it is out of sync with the client's position by the time the message is received. This fix gives users the option to not synchronize the transform position of a NetworkObject when using an owner authoritative motion mode.
* fix
This fix provides users with the option to have child `NetworkTransform`(s) tick synchronized with their parent. When the parent has `TickSyncChildren` enabled, any child `NetworkTransform`(s) that the local client has authority over will force a synchronization of their transform state. When a client is not the authority of the parent but it is the authority of one or more children, then when the parent sends a state update it will force the child/children the client has authority over to send a state update. Children will still send state updates if the transform has a delta that exceeds an axis threshold and the parent has yet to send a synchronization, but if a parent sends a synchronization within the same tick period the child/children will still send another state update.
* wip
Better approach, but still flawed.
I think converting any remaining items in the interpolators when the transform space changes will yield consistent results.
* fix
Seamless transform space transitions when parenting.
* update
We no longer need to send lossy scale since we defer applying the initial synchronization data until the non-authority side has finished synchronizing.
* fix
Fixing some minor issues with nested `NetworkTransforms` (i.e. under the same `NetworkObject`) and adding additional comments.
Reverting back to just checking `InLocalSpace` (as opposed to the interpolator's) when applying a position on the non-authority side.
* test fix
Fixing some issues with `NestedNetworkTransformTests` assets to account for some past updates.
Fixing an issue with `NetworkTransformTests` where it needs to not just advance the tick (for updates) but needs to also advance to the next tick.
* fix
caught scenario where `NetworkObject.NetworkTransforms` could not be set properly.
* fix
This fixes a minor "blip" when transitioning from world to local space,
* test
disabling two tests that need to be reviewed by Kitty and/or re-written.
* fix
Updating all NetworkTransform instances that belong to a specific NetworkObject as opposed to just the root.
Also not updating when not spawned or disabled NetworkTransforms.
* test
Making test asset adjustments for recent updates in NetworkTransform.
* update
Adding change log entry.
* update
mid-point check-in
* test
Updating interpolation test to recent NetworkTransform updates.
* update
wip towards getting a cleaner divide between the two modes.
* update
Some adjustments to when nested children check their own state updates or exit early.
* update
Cleaning up some Rigidbody references and making Rigidbody & Rigidbody2D accessible via NetworkRigidbody and NetworkRigidbody2D.
* update
Adding an internal InternalOnNetworkObjectParentChanged method that gets invoked ahead of OnNetworkObjectParentChanged so user code can't override any NGO components that need this kind of notification.
* update
Adding InternalOnNetworkSessionSynchronized to be invoked by NGO components to assure they don't get overridden by user script.
* update
Renaming some internal properties that are common names and would conflict with serialization if a user defined them in a derived class.
Making sure both the position and rotation interpolators are configured for the transform space when reset.
Adding the ability to change the parent locally when running with a client-server network topology.
Adding SwitchTransformSpaceWhenParented property to the NetworkTransformEditor.
Shifting all of the non-authority's final synchronization logic to occur either once a client's initial connection synchronization is complete or when all of the NetworkObject's components have run through the spawn process.
* update
Adding some improved and needed UI updates to NetworkBehaviour derived components and NetworkManager.
This includes a new NetcodeEditorBase class that allows users to more easily create customized, multi-generation, components that have their properties organized based on the generation of each child.
* fix
Wrapping the NetworkRigidbodyBaseEditor within physics defines.
* style
>.<
(sigh) null checks can be simplified style/standards update.
* update
switching from TT as a class to TT as a MonoBehaviour.
* fix
This fixes an issue where a server instance parenting with AllowOwnerToParent set would send to itself.
Adding check within the NetworkObject parenting logic to pass through to the server portion of sending the parenting message.
* test
adding some validation tests for the updates made in #3013
* update
adding changelog entries
* fix
This fixes the two failing tests within NetworkTransformAnticipationTest and updates AnticipatedNetworkTransform to account for #3013's updates/changes.
* fix
Removing the added base.OnInspectorGUI() call (was causing duplicated properties)
* update
Assure the callouts and call-to-action buttons show up outside of the Foldout Group when extending NetworkManager.
Assure that the NetworkManager has no Foldout Group when it is not extended.1 parent 21cf55e commit aee018c
File tree
25 files changed
+1363
-374
lines changed- com.unity.netcode.gameobjects
- Editor
- Runtime
- Components
- Interpolator
- Core
- Messaging/Messages
- Tests/Runtime
- NetworkTransform
- testproject/Assets/Tests
- Manual/NestedNetworkTransforms
- Runtime/NetworkTransform
25 files changed
+1363
-374
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
17 | | - | |
| 22 | + | |
18 | 23 | | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
22 | 34 | | |
23 | 35 | | |
24 | 36 | | |
| |||
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | 304 | | |
| 305 | + | |
307 | 306 | | |
308 | 307 | | |
309 | 308 | | |
| |||
Lines changed: 47 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
| 171 | + | |
173 | 172 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | 173 | | |
182 | 174 | | |
183 | 175 | | |
| |||
298 | 290 | | |
299 | 291 | | |
300 | 292 | | |
| 293 | + | |
| 294 | + | |
301 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
302 | 301 | | |
303 | | - | |
| 302 | + | |
304 | 303 | | |
305 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
306 | 307 | | |
307 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
308 | 311 | | |
309 | | - | |
310 | | - | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | | - | |
| 315 | + | |
314 | 316 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
| 317 | + | |
| 318 | + | |
324 | 319 | | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
329 | 323 | | |
330 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
331 | 328 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
| 329 | + | |
336 | 330 | | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
343 | 337 | | |
344 | 338 | | |
345 | 339 | | |
| |||
368 | 362 | | |
369 | 363 | | |
370 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
371 | 380 | | |
372 | 381 | | |
373 | 382 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| |||
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
42 | | - | |
| 45 | + | |
43 | 46 | | |
| 47 | + | |
| 48 | + | |
44 | 49 | | |
45 | 50 | | |
46 | 51 | | |
| |||
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
67 | | - | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
141 | 146 | | |
142 | 147 | | |
143 | 148 | | |
| 149 | + | |
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
147 | 158 | | |
148 | 159 | | |
149 | 160 | | |
| |||
163 | 174 | | |
164 | 175 | | |
165 | 176 | | |
166 | | - | |
167 | | - | |
| 177 | + | |
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
174 | 184 | | |
175 | | - | |
| 185 | + | |
176 | 186 | | |
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
| 191 | + | |
| 192 | + | |
181 | 193 | | |
182 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
183 | 202 | | |
184 | 203 | | |
185 | 204 | | |
0 commit comments