Commit 87e25ba
authored
fix: In-Scene Placed Object Parenting and Serialization Order (back port) (Unity-Technologies#3388)
This is the back port of Unity-Technologies#3387 that resolves some issues with in-scene
placed NetworkObjects in parent-child hierarchy and the synchronization
of late joining clients when the hierarchy has changed from that of its
default hierarchy defined within the scene.
[MTT-11883](https://jira.unity3d.com/browse/MTT-11883)
## Changelog
- Fixed: Issue where in-scene placed `NetworkObjects` could fail to
synchronize its transform properly (especially without a
`NetworkTransform`) if their parenting changes from the default when the
scene is loaded and if the same scene remains loaded between network
sessions while the parenting is completely different from the original
hierarchy.
- Changed: The scene loading event serialization order for in-scene
placed `NetworkObject`s to be based on their parent-child hierarchy.
## Testing and Documentation
- Includes no additional tests (_requires manual testing due to scene
loading constraints_).
- No documentation changes or additions were necessary.1 parent 9738a6e commit 87e25ba
File tree
4 files changed
+84
-60
lines changed- com.unity.netcode.gameobjects
- Runtime
- Core
- SceneManagement
- Spawning
4 files changed
+84
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
Lines changed: 37 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
| 188 | + | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 190 | + | |
194 | 191 | | |
195 | | - | |
196 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
1241 | 1244 | | |
1242 | 1245 | | |
1243 | 1246 | | |
1244 | | - | |
| 1247 | + | |
1245 | 1248 | | |
1246 | 1249 | | |
1247 | 1250 | | |
| |||
1314 | 1317 | | |
1315 | 1318 | | |
1316 | 1319 | | |
1317 | | - | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
1318 | 1324 | | |
1319 | 1325 | | |
1320 | 1326 | | |
| |||
1340 | 1346 | | |
1341 | 1347 | | |
1342 | 1348 | | |
1343 | | - | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
1344 | 1353 | | |
1345 | 1354 | | |
1346 | 1355 | | |
| |||
1819 | 1828 | | |
1820 | 1829 | | |
1821 | 1830 | | |
| 1831 | + | |
| 1832 | + | |
1822 | 1833 | | |
1823 | 1834 | | |
1824 | 1835 | | |
| |||
1829 | 1840 | | |
1830 | 1841 | | |
1831 | 1842 | | |
1832 | | - | |
1833 | | - | |
1834 | | - | |
| 1843 | + | |
| 1844 | + | |
1835 | 1845 | | |
1836 | | - | |
1837 | | - | |
1838 | | - | |
1839 | | - | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
| 1846 | + | |
1845 | 1847 | | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
| 1848 | + | |
1855 | 1849 | | |
1856 | | - | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
1857 | 1853 | | |
1858 | 1854 | | |
1859 | 1855 | | |
| |||
1866 | 1862 | | |
1867 | 1863 | | |
1868 | 1864 | | |
1869 | | - | |
1870 | | - | |
1871 | | - | |
1872 | | - | |
1873 | | - | |
1874 | | - | |
1875 | 1865 | | |
1876 | 1866 | | |
1877 | 1867 | | |
| |||
1949 | 1939 | | |
1950 | 1940 | | |
1951 | 1941 | | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
1952 | 1951 | | |
1953 | 1952 | | |
1954 | 1953 | | |
| |||
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| 325 | + | |
| 326 | + | |
325 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
326 | 333 | | |
327 | 334 | | |
328 | 335 | | |
| |||
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
| 578 | + | |
| 579 | + | |
571 | 580 | | |
572 | 581 | | |
573 | 582 | | |
574 | 583 | | |
575 | 584 | | |
576 | 585 | | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
| 586 | + | |
581 | 587 | | |
582 | 588 | | |
583 | 589 | | |
584 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
585 | 603 | | |
586 | 604 | | |
587 | 605 | | |
| |||
Lines changed: 23 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
577 | 576 | | |
578 | 577 | | |
579 | 578 | | |
| |||
605 | 604 | | |
606 | 605 | | |
607 | 606 | | |
608 | | - | |
609 | 607 | | |
610 | 608 | | |
611 | 609 | | |
612 | 610 | | |
613 | | - | |
614 | | - | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
626 | 623 | | |
627 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
628 | 636 | | |
629 | 637 | | |
630 | 638 | | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
| 639 | + | |
| 640 | + | |
635 | 641 | | |
636 | 642 | | |
637 | 643 | | |
| |||
674 | 680 | | |
675 | 681 | | |
676 | 682 | | |
677 | | - | |
678 | 683 | | |
679 | 684 | | |
680 | 685 | | |
| |||
0 commit comments