Commit cd50a00
authored
fix: NetworksSenemanager order of operations and scene migration preprocess (#2532)
* fix
Change the order of operations where clients match the server's currently active scene and then spawn and synchronize NetworkObjects locally on the server.
Preprocess the scenes containing NetworkObjects to send scene migration notifications for in the event the NetworkObjects were despawned in the same frame.
* fix
Change the logic to detect if setting the synchronization mode is occurring when clients are already connected so that it is checking against whether it is a host vs server.
* Style
fixing white space issues.
* test
Added test to verify that late joining clients synchronize properly when a NetworkObject is migrated into a new scene and then despawn and destroyed during a late joining client's initial synchronization.
* update
Updating changelog1 parent 9246d94 commit cd50a00
File tree
4 files changed
+79
-7
lines changed- com.unity.netcode.gameobjects
- Runtime/SceneManagement
- testproject/Assets/Tests/Runtime/NetworkSceneManager
4 files changed
+79
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| |||
Lines changed: 41 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2026 | 2026 | | |
2027 | 2027 | | |
2028 | 2028 | | |
2029 | | - | |
2030 | | - | |
2031 | 2029 | | |
2032 | 2030 | | |
2033 | 2031 | | |
| |||
2039 | 2037 | | |
2040 | 2038 | | |
2041 | 2039 | | |
2042 | | - | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
2043 | 2044 | | |
2044 | 2045 | | |
2045 | 2046 | | |
| |||
2468 | 2469 | | |
2469 | 2470 | | |
2470 | 2471 | | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
2471 | 2475 | | |
2472 | 2476 | | |
2473 | 2477 | | |
| |||
2479 | 2483 | | |
2480 | 2484 | | |
2481 | 2485 | | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
| 2516 | + | |
| 2517 | + | |
| 2518 | + | |
| 2519 | + | |
2482 | 2520 | | |
2483 | 2521 | | |
2484 | 2522 | | |
| |||
Lines changed: 35 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
| 210 | + | |
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
218 | 248 | | |
219 | 249 | | |
220 | 250 | | |
221 | 251 | | |
222 | 252 | | |
223 | 253 | | |
224 | | - | |
| 254 | + | |
225 | 255 | | |
226 | 256 | | |
227 | 257 | | |
| |||
233 | 263 | | |
234 | 264 | | |
235 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
236 | 269 | | |
237 | 270 | | |
238 | 271 | | |
| |||
0 commit comments