Repository navigation
Commit 8e8d766
authored
fix: remove the NetworkObjectBridge when a hybrid prefab stops being hybrid (#4211)
* fix: remove the NetworkObjectBridge when a hybrid prefab stops being hybrid
Removing GhostObject from a hybrid prefab now removes only the hidden
NetworkObjectBridge and any GhostRigidbody, instead of every GhostBehaviour,
and restores SynchronizeTransform. Removing NetworkObject from a hybrid
prefab also removes the bridge. The bridge now sets FullTickSmoothing in
place of the obsolete SingleWorldHostInterpolationSmoothing.
* update
Clearing HasGhost.
* fix: revalidate after GhostObject removal and guard deferred editor callbacks
The GhostObject removal hook now re-runs UnifiedValidation on the next editor tick, so GhostObject and
HasGhost match the components on the prefab stage root, and the bridge comes back when the hook fired
for a different GhostBehaviour. The deferred add/remove callbacks unsubscribe first and return when
their NetworkObject was destroyed.
* chore: retrigger CI
* fix: drop the GhostObject removal callback and keep the user's ghost modes
UnifiedValidation removes a leftover NetworkObjectBridge, so the GhostObjectEditor pre-removal callback is no longer needed. It also fired when the inspection component was removed, and the rebuilt bridge reset SupportedGhostModes. The bridge no longer forces SupportedGhostModes to Interpolated.
* Clean up NetworkObjectBridge by removing physics code
Removed unused physics-related code and comments.
* Refactor HybridParentUpdate and remove ApplyScale method
Removed the ApplyScale method and commented out the current position and rotation logging.1 parent 212a491 commit 8e8d766
4 files changed
Lines changed: 81 additions & 82 deletions
File tree
- com.unity.netcode.gameobjects
- Documentation~
- Editor
- Runtime
- Components/Helpers
- Core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
| |||
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
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 | 25 | | |
57 | 26 | | |
58 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| |||
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 21 | | |
31 | 22 | | |
32 | 23 | | |
| |||
37 | 28 | | |
38 | 29 | | |
39 | 30 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 31 | + | |
| 32 | + | |
47 | 33 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 34 | + | |
| 35 | + | |
55 | 36 | | |
56 | | - | |
57 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
58 | 47 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 48 | | |
64 | 49 | | |
65 | 50 | | |
| |||
79 | 64 | | |
80 | 65 | | |
81 | 66 | | |
82 | | - | |
| 67 | + | |
83 | 68 | | |
84 | 69 | | |
85 | 70 | | |
86 | 71 | | |
87 | 72 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 73 | | |
94 | 74 | | |
95 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
| 373 | + | |
373 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
378 | 403 | | |
379 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
380 | 423 | | |
381 | 424 | | |
382 | 425 | | |
| |||
390 | 433 | | |
391 | 434 | | |
392 | 435 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
396 | 439 | | |
397 | 440 | | |
398 | | - | |
399 | | - | |
| 441 | + | |
400 | 442 | | |
401 | | - | |
402 | | - | |
| 443 | + | |
| 444 | + | |
403 | 445 | | |
404 | 446 | | |
405 | | - | |
| 447 | + | |
406 | 448 | | |
407 | | - | |
408 | | - | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
409 | 459 | | |
410 | 460 | | |
411 | 461 | | |
| |||
0 commit comments