Commit bebbc3a
authored
fix: serialize the scene placed field and fix DA scene migration (#4086)
* fix
- Adjusted the `InScenePlaced` property to internally set or publicly get the serialized `m_InScenePlaced` field.
- `NetworkObject` now implements `ISerializationCallbackReceiver` to assure `m_InScenePlaced` is always properly set for in-scene placed objects.
- Removed legacy define for UNITY_2021_2_OR_NEWER since v2.x.x+ is only for Unity v6.
* test
- Adding `NetworkSceneManagerStartupTests` which validates this PR.
- Adding the assets and script needed to validate this PR.
- Updated scenes in build list to include the new scene: InSceneNetworkObjectMovesToDDOL.
* update
Adding change log entry.
* fix
Fixing issue with marking things as in-scene placed during runtime.
* update
Commenting out the addressable scene test.
Adding back the check for InScenePlaced when shutting down.
* revert and update
- `ISerializationCallbackReceiver` implementation as that does not accomplish what we need.
- Setting InScenePlaced within OnValidate instead.
* fix
Only reset things that have been spawned are in-scene placed, and is assigned to the relative NetworkManager (for integration testing purposes)
* update
Removing the addressable scene.
We will revisit this when this is supported.
* fix and style
Fixing several issues with NetworkObjectSceneMigrationTests.
Fixing several formatting issues.
* style
brackets adjustment.
* style
Adding white spaces between foreach and if
* style
Fixing some out of alignment if statements.
* style
Didn't save the change... adding last standards check issue fix.
* fix
Fixing issue where we were sending scene migration notifications when migrating into the DDOL.
Fixing issue where if a client detected a changed scene but had no scene change to send (later) it would throw and exception and cause a memory leak.
* update
Remove the legacy multiprocess scene that is no longer used and has references to scripts that no longer exist.
* fix
Issue where distributed authority would throw an exception during scene migration due to the fact that we would throw an exception if the 1st scene in the scene migration table didn't contain the client that has authority over the NetworkObject that migrated into a new scene. Now we count how many entries were written and if that count is zero upon parsing known loaded scenes then it throws an exception.
Reverting the exclusion of DDOL synchronization (that was a red herring).
* test - fix
Removing the ValidateSceneOnAllClients portion as that doesn't assure that all clients have loaded the scene and fully synchronized the scene which could lead to edge case issues during this test.
* update
Adding and updating the change log entries for this PR.1 parent 6d6e249 commit bebbc3a
30 files changed
Lines changed: 815 additions & 1351 deletions
File tree
- com.unity.netcode.gameobjects
- Editor
- Runtime
- Components
- Interpolator
- Connection
- Core
- SceneManagement
- Spawning
- Tests/Runtime
- DistributedAuthority
- NetworkTransform
- testproject
- Assets
- AddressableAssetsData
- AssetGroups
- Scenes
- Tests
- Manual
- IntegrationTestScenes
- Scripts
- Runtime
- Animation
- NetworkSceneManager
- ProjectSettings
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
Lines changed: 24 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
471 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
472 | 480 | | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
| 481 | + | |
483 | 482 | | |
| 483 | + | |
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
597 | | - | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
598 | 606 | | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 607 | + | |
609 | 608 | | |
| 609 | + | |
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
| |||
Lines changed: 28 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1180 | 1180 | | |
1181 | 1181 | | |
1182 | 1182 | | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1183 | 1187 | | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
1189 | 1192 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
| 1193 | + | |
1193 | 1194 | | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | | - | |
1198 | | - | |
| 1195 | + | |
1199 | 1196 | | |
1200 | | - | |
1201 | | - | |
| 1197 | + | |
1202 | 1198 | | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
1203 | 1202 | | |
1204 | 1203 | | |
1205 | 1204 | | |
| |||
1346 | 1345 | | |
1347 | 1346 | | |
1348 | 1347 | | |
1349 | | - | |
1350 | | - | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
1351 | 1352 | | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
| 1353 | + | |
| 1354 | + | |
1358 | 1355 | | |
1359 | | - | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
1360 | 1361 | | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
| 1362 | + | |
| 1363 | + | |
1367 | 1364 | | |
| 1365 | + | |
1368 | 1366 | | |
1369 | 1367 | | |
1370 | 1368 | | |
| |||
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2515 | 2515 | | |
2516 | 2516 | | |
2517 | 2517 | | |
2518 | | - | |
2519 | | - | |
| 2518 | + | |
| 2519 | + | |
| 2520 | + | |
| 2521 | + | |
| 2522 | + | |
2520 | 2523 | | |
2521 | | - | |
2522 | | - | |
2523 | | - | |
2524 | 2524 | | |
2525 | | - | |
2526 | | - | |
2527 | | - | |
2528 | | - | |
2529 | | - | |
2530 | | - | |
2531 | | - | |
2532 | | - | |
2533 | | - | |
2534 | | - | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
2535 | 2528 | | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
2536 | 2536 | | |
2537 | 2537 | | |
2538 | 2538 | | |
| |||
3488 | 3488 | | |
3489 | 3489 | | |
3490 | 3490 | | |
3491 | | - | |
3492 | | - | |
3493 | | - | |
3494 | | - | |
3495 | | - | |
3496 | | - | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
3497 | 3497 | | |
3498 | 3498 | | |
3499 | 3499 | | |
| |||
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
967 | 967 | | |
968 | 968 | | |
969 | 969 | | |
970 | | - | |
971 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
972 | 974 | | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
| 975 | + | |
982 | 976 | | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
983 | 982 | | |
984 | 983 | | |
985 | 984 | | |
| |||
0 commit comments