Commit 6c46dfd
authored
fix: network objects to synchronize scene changes edge cases (#3230)
* fix
Clean up scene migration synchronization table entry when GameObject is destroyed when it should not have been.
* fix
Clean up scene migration synchronization table when NetworkManager shuts down.
* fix
adding check for any in-scene placed NetworkObjects.
removing whenever destroyed (if entry still exists).
* test
Minor test to validate the NetworkObject is no longer within the NetworkObject.NetworkObjectsToSynchronizeSceneChanges list upon destroying it prior to it being despawned.
* update
Adding change log entries.
* fix
Removing static NetworkObjectsToSynchronizeSceneChanges and CleanUpDisposedObjects and migrating them to normal properties within the NetworkSpawnManager.
* test
Adding a validation at the end of the scene load-unload test to assure the NetworkObjectsToSynchronizeSceneChanges has no remaining in-scene placed NetworkObjects when all scenes are unloaded.
Removing a verbose setting from InScenePlacedNetworkObjectTests.
* fix
Fixing issue with logic for scene migration synchronization.
* update
switching from a list to a stack
* test
Had to adjust for the changes from static to NetworkManager relative (for DA mode).1 parent 4ff5b8e commit 6c46dfd
File tree
7 files changed
+120
-57
lines changed- com.unity.netcode.gameobjects
- Runtime
- Core
- Spawning
- Tests/Runtime/NetworkObject
- testproject/Assets/Tests/Runtime/NetworkSceneManager
7 files changed
+120
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| |||
Lines changed: 21 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
322 | 325 | | |
323 | 326 | | |
324 | 327 | | |
| |||
1596 | 1599 | | |
1597 | 1600 | | |
1598 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
1599 | 1605 | | |
1600 | 1606 | | |
1601 | 1607 | | |
| |||
1617 | 1623 | | |
1618 | 1624 | | |
1619 | 1625 | | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1620 | 1629 | | |
1621 | 1630 | | |
1622 | 1631 | | |
| |||
2392 | 2401 | | |
2393 | 2402 | | |
2394 | 2403 | | |
2395 | | - | |
2396 | | - | |
2397 | | - | |
2398 | | - | |
2399 | | - | |
2400 | 2404 | | |
2401 | 2405 | | |
2402 | 2406 | | |
| |||
2451 | 2455 | | |
2452 | 2456 | | |
2453 | 2457 | | |
2454 | | - | |
2455 | | - | |
2456 | 2458 | | |
2457 | 2459 | | |
2458 | 2460 | | |
| 2461 | + | |
2459 | 2462 | | |
2460 | 2463 | | |
2461 | 2464 | | |
2462 | 2465 | | |
2463 | 2466 | | |
2464 | | - | |
2465 | | - | |
2466 | | - | |
2467 | | - | |
2468 | | - | |
2469 | 2467 | | |
2470 | 2468 | | |
2471 | 2469 | | |
| |||
3276 | 3274 | | |
3277 | 3275 | | |
3278 | 3276 | | |
3279 | | - | |
3280 | | - | |
3281 | | - | |
3282 | | - | |
3283 | | - | |
3284 | | - | |
3285 | | - | |
3286 | | - | |
3287 | | - | |
3288 | | - | |
3289 | | - | |
3290 | | - | |
3291 | | - | |
3292 | | - | |
3293 | | - | |
3294 | | - | |
3295 | | - | |
3296 | | - | |
3297 | | - | |
3298 | | - | |
3299 | | - | |
3300 | | - | |
3301 | | - | |
3302 | | - | |
3303 | | - | |
3304 | 3277 | | |
3305 | 3278 | | |
3306 | 3279 | | |
| |||
3323 | 3296 | | |
3324 | 3297 | | |
3325 | 3298 | | |
3326 | | - | |
| 3299 | + | |
3327 | 3300 | | |
3328 | 3301 | | |
3329 | 3302 | | |
3330 | 3303 | | |
3331 | 3304 | | |
3332 | | - | |
| 3305 | + | |
3333 | 3306 | | |
3334 | | - | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
3335 | 3314 | | |
3336 | 3315 | | |
3337 | | - | |
3338 | | - | |
3339 | | - | |
| 3316 | + | |
| 3317 | + | |
3340 | 3318 | | |
3341 | 3319 | | |
3342 | 3320 | | |
| |||
Lines changed: 57 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | 156 | | |
168 | 157 | | |
169 | 158 | | |
| |||
1161 | 1150 | | |
1162 | 1151 | | |
1163 | 1152 | | |
| 1153 | + | |
| 1154 | + | |
1164 | 1155 | | |
1165 | 1156 | | |
1166 | 1157 | | |
| |||
1196 | 1187 | | |
1197 | 1188 | | |
1198 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1199 | 1234 | | |
1200 | 1235 | | |
1201 | 1236 | | |
| |||
1729 | 1764 | | |
1730 | 1765 | | |
1731 | 1766 | | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1732 | 1778 | | |
1733 | 1779 | | |
1734 | 1780 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| |||
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
136 | 151 | | |
137 | 152 | | |
138 | 153 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| 313 | + | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
358 | 361 | | |
359 | 362 | | |
360 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
361 | 367 | | |
362 | 368 | | |
| 369 | + | |
363 | 370 | | |
364 | 371 | | |
365 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
366 | 388 | | |
367 | 389 | | |
368 | 390 | | |
| |||
0 commit comments