Commit b712d1c
authored
* fix
MTT-2924
This is the first pass at solving the issue where late joining clients are not synchronized properly with despawned in-scene NetworkObjects.
* Update CHANGELOG.md
* Update CHANGELOG.md
* fix
This allows for respawning of in-scene placed NetworkObjects without having to register them with the NetworkManager.
* Update CHANGELOG.md
* style
* Update CHANGELOG.md
* style
whitespace fixes.
* fix
Passing the entire SceneObject structure as opposed to adding more parameters to the NetworkSpawnManager.HasPrefab method in order to be able to extract the NetworkSceneHandle and include the in-scene placed NetworkObjects as part of the "prefabs to search for".
* update
This is some work towards integration tests where clients might be able to actually load scenes as opposed to fake loading them
* fix
Fixed some minor issues with tests.
Updated HiddenVariableTests as it needed some timing related adjustments.
* Update NetworkSceneManagerEventDataPoolTest.cs
* style
* style
* test - integration test clients now load scenes
This update allows for clients to load scenes and synchronize in-scene placed NetworkObjects during integration testing.
* test - fix
Now that clients are loading scenes, needed to make some minor adjustments.
* test - fix
Realized I don't need to simulate client loading delay unless the client is blocked from loading.
Also had to adjust whether the metrics tests waited for the client or not when loading.
* fix
Fixes an issue that can occur where this becomes enabled in test runner and will throw an exception if target is null.
* fix - NetworkSceneManager.GetSceneRelativeInSceneNetworkObject
GetSceneRelativeInSceneNetworkObject needed to get the sceneHandle before checking for it existing in the ScenePlacedObjects.
* fix - AddDespawnedInSceneNetworkObjects
AddDespawnedInSceneNetworkObjects needed to only return despawned NetworkObjects belonging to the NetworkManager.
* test - fix - Integration test client scene loading
This fixes some of the last edge case scenarios such as:
- Not loading scenes for clients when a non-NetcodeIntegrationTest based integration test is running since this does require some additional management and cleanup.
- Assuring that in-scene NetworkObjects have the right NetworkManager assigned when loaded
- Added a check to assure that it didn't time out while waiting for all clients to connect
- Increased the NetcodeIntegrationTestHelpers default timeout to 2s vs 1s (clients loading scenes can slow down when things happen)
- NetcodeIntegrationTests now unload all scenes loaded (but the test runner scene) during teardown and onetimeteardown.
* test update
Just adding timeout checks in both NetworkVariableTests and TimeMultiInstanceTest
* test assets
Updating some of the assets used for integration testing now that clients are loading scenes too.
* test fix
Changing the scenes being loaded to avoid integration test specific SDK architecture related issues.
* test fix
An early shutdown was not needed here
* test fix
Disabling the audio listener in the EmptyScene to reduce console spam during integration tests.
* test fix
Fixing edge case timing issue with MessageOrdering.
* test InScenePlacedNetworkObjects
This is the integration test for this PR.
It tests late joining client synchronization with despawned NetworkObjects and tests that in-scene placed NetworkObjects do not need to be registered with the NetworkManager to be spawned.
* fix
Don't throw an exception when calling GetObservers or IsNetworkVisibleTo when the NetworkObject is not spawned.
* fix
fixing typo/mistake for the scene to be unloaded.
* style
* Update ObjectNameIdentifier.cs
* style
* style
updating comments and removing LFs and some commented out code.
* update and style
updating comments and minor final tweaks.
* update
minor changes suggested by Jeffrey R.
* update
removing scene management specific code from places where scene management is disabled.
* style
updated some comments
* fix
Fixing an issue where CheckValueOnClient was crashing. Integration test timing did change slightly now that clients load scenes, so it was possible that the key would not exist by the time it was being checked.
* fix consoles
reducing the number of clients from 9 to 4 in some of the NetworkSceneManager related tests as I think it impacted performance enough to cause clients to take longer than the default timeout of 2 seconds.
* fix
Hopefully this will fix the issue with Xbox Scarlett
* test - fix
Removing m_CanCheckLoadUnloadEvents as that was a sanity check while I was testing clients loading scenes. This could possibly fix an edge case scenario issue where a message might get ignored.
* update
removing NetworkSceneHandle from NetworkObject as it was not needed.
* Update CHANGELOG.md
* update
Removing wait for clients to unload scenes and unloading them via SceneManager as the test has already completed and this is more clean up than anything else.
* test update
Removed the crazy code in ObjectNameIdentifier for adding tag information and simplified it by storing the original name and using that each time it needs to regenerate the tag information.
Moved where the NetworkManager name and tag information is applied to get the right client id.
Added additional debug information.
* style
* test
Testing with verbose mode to see why this passes on Windows 10 in a stand alone build and in the editor but fails on Yamato desktops.
* test
adding more debug info.
* test fix
Looks like the scene isn't really loaded when it says it is loaded.
Moving when the NetworkSceneManager's callback is invoked and adding delay before invoking.
* test fix
Making some additional modifications to see if it was when the NetworkSceneManager scene Load/Unload event action is invoked and reducing the number of clients to 1.
* Test Fix
Minor tweaks and merging develop into this branch.
* test fix
Found a bug in some recent changes that would cause a crash under specific scenarios.
* fix
* test and style
Went back through some of the changed files and removed some code no longer needed, extended some of the verbose debug info for any future debugging purposes, and updated some of the comments.
* style
removing commented out code.
1 parent 4a5c86f commit b712d1c
File tree
40 files changed
+1687
-349
lines changed- com.unity.netcode.gameobjects
- Editor
- Runtime
- Core
- Messaging/Messages
- SceneManagement
- Spawning
- TestHelpers/Runtime
- Components
- Tests/Runtime
- Timing
- testproject-tools-integration/Assets/Tests/Runtime
- testproject/Assets
- Scenes
- Tests
- Manual
- IntegrationTestScenes
- SceneTransitioningAdditive
- Scripts
- Runtime
- NetworkSceneManager
40 files changed
+1687
-349
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1838 | 1838 | | |
1839 | 1839 | | |
1840 | 1840 | | |
1841 | | - | |
| 1841 | + | |
1842 | 1842 | | |
1843 | 1843 | | |
1844 | 1844 | | |
| |||
Lines changed: 46 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | | - | |
| 163 | + | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
| 178 | + | |
178 | 179 | | |
179 | | - | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
375 | | - | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
865 | 865 | | |
866 | 866 | | |
867 | 867 | | |
| 868 | + | |
| 869 | + | |
868 | 870 | | |
869 | 871 | | |
870 | | - | |
871 | | - | |
872 | | - | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
878 | 879 | | |
879 | 880 | | |
880 | 881 | | |
| |||
900 | 901 | | |
901 | 902 | | |
902 | 903 | | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
903 | 914 | | |
904 | 915 | | |
905 | 916 | | |
| |||
910 | 921 | | |
911 | 922 | | |
912 | 923 | | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
917 | 930 | | |
918 | 931 | | |
919 | 932 | | |
| |||
937 | 950 | | |
938 | 951 | | |
939 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
940 | 963 | | |
941 | 964 | | |
942 | 965 | | |
| |||
1006 | 1029 | | |
1007 | 1030 | | |
1008 | 1031 | | |
| 1032 | + | |
1009 | 1033 | | |
1010 | 1034 | | |
1011 | 1035 | | |
| |||
1018 | 1042 | | |
1019 | 1043 | | |
1020 | 1044 | | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
1021 | 1050 | | |
1022 | 1051 | | |
1023 | 1052 | | |
1024 | | - | |
| 1053 | + | |
1025 | 1054 | | |
1026 | 1055 | | |
1027 | 1056 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
18 | 23 | | |
19 | 24 | | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
0 commit comments