Commit 06118b8
fix: ChangeOwnership sending own clientId and added NetworkSceneHandle struct (#3647)
* chore: Update the OwnershipPermissionsTests to work with rust server
* Remove TestHelpers change
* Ensure we don't send CreateObject messages to the cmb service when there are no valid receivers
* dotnet-fix
* Ensure the DAHost complains if the senderId is included in the ClientIds list
* Refactor and unify the ChangeOwnership message sending
* Update the NetworkObjectOwnershipPropertiesTests to work with rust
* Add placeholder SceneHandle object
* Add serializer for the SceneHandle
* Use SceneHandle in place of int
* Fix ulong to int conversions
* Ensure the spawn manager has the SceneHandle object in scope
* Fix implicit conversions in the tests
* Fix remaining implicit conversions in DistributedAuthorityCodecTests
* Fix more ulong to int conversions
* Simplify the IntegrationTestSceneHandler some
* Update the testproject asmdef so the sceneEventDataTests compile
* fix whitespace
* fix whitespace part 2 electric boogaloo
* Fix codestyle violations
* Fix import ordering
* fix FastBuffer tests
* Remove serialization changes
* Use NetworkSceneHandle wrapper class
* Remove unneeded changes
* Remove accidental int conversion
* Ensure the tests use a specific constructor
* Use the correct syntax
* Fix whitespace errors
* Fix the xml doc
* fix
This resolves the issue with the new edge case where a scene could be unloaded but a spawned object referencing the scene handle could still be spawned (pending being de-spawned within a few frames).
---------
Co-authored-by: Noel Stephens <[email protected]>1 parent 6626762 commit 06118b8
File tree
19 files changed
+491
-305
lines changed- .yamato
- com.unity.netcode.gameobjects
- Runtime
- Core
- Messaging/Messages
- SceneManagement
- Spawning
- Tests/Runtime
- DistributedAuthority
- NetworkObject
- TestHelpers
- testproject/Assets/Tests/Runtime/NetworkSceneManager
19 files changed
+491
-305
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | | - | |
| 1370 | + | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
1375 | | - | |
| 1375 | + | |
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
| |||
1393 | 1393 | | |
1394 | 1394 | | |
1395 | 1395 | | |
1396 | | - | |
| 1396 | + | |
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
| |||
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
1408 | | - | |
| 1408 | + | |
1409 | 1409 | | |
1410 | | - | |
| 1410 | + | |
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | | - | |
| 1414 | + | |
1415 | 1415 | | |
1416 | 1416 | | |
1417 | 1417 | | |
| |||
2907 | 2907 | | |
2908 | 2908 | | |
2909 | 2909 | | |
2910 | | - | |
| 2910 | + | |
2911 | 2911 | | |
2912 | 2912 | | |
2913 | 2913 | | |
| |||
3420 | 3420 | | |
3421 | 3421 | | |
3422 | 3422 | | |
3423 | | - | |
| 3423 | + | |
3424 | 3424 | | |
3425 | 3425 | | |
3426 | 3426 | | |
3427 | 3427 | | |
3428 | 3428 | | |
3429 | 3429 | | |
3430 | 3430 | | |
3431 | | - | |
3432 | 3431 | | |
3433 | 3432 | | |
3434 | 3433 | | |
| |||
Lines changed: 46 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
| |||
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| 148 | + | |
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | 152 | | |
150 | | - | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
156 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | | - | |
| 174 | + | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
167 | | - | |
| 179 | + | |
168 | 180 | | |
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
172 | 184 | | |
173 | 185 | | |
174 | 186 | | |
175 | | - | |
| 187 | + | |
176 | 188 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 189 | | |
183 | 190 | | |
184 | 191 | | |
| |||
199 | 206 | | |
200 | 207 | | |
201 | 208 | | |
202 | | - | |
| 209 | + | |
203 | 210 | | |
204 | | - | |
205 | | - | |
206 | 211 | | |
207 | 212 | | |
208 | 213 | | |
| |||
260 | 265 | | |
261 | 266 | | |
262 | 267 | | |
| 268 | + | |
| 269 | + | |
263 | 270 | | |
264 | 271 | | |
265 | | - | |
| 272 | + | |
266 | 273 | | |
267 | | - | |
268 | | - | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| |||
302 | 307 | | |
303 | 308 | | |
304 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
305 | 324 | | |
306 | 325 | | |
307 | 326 | | |
308 | | - | |
| 327 | + | |
309 | 328 | | |
310 | 329 | | |
311 | 330 | | |
312 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
313 | 342 | | |
314 | 343 | | |
315 | 344 | | |
316 | 345 | | |
317 | 346 | | |
318 | | - | |
| 347 | + | |
319 | 348 | | |
320 | 349 | | |
321 | 350 | | |
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments