Commit 789f375
authored
fix: NetworkTransport early and post late updates (#3113)
* fix
Break out the UnityTransport's Update method into two methods: EarlyUpdate and PostLateUpdate.
* update
Modifications to NetworkManager to invoke the newly adding EarlyUpdate and PostLateUpdate methods.
* update
Adjusting the job handle name.
Migrating the m_FlushSendJobHandle.Complete(); outside of the driver IsCreated check to avoid any potential job safety issues.
* style
removing unused Update method and removing the Unity.Netcode.Transports.UTP namespace reference.
* update
Removing the job handle stuff as that could potentially break users trying to get RTT during OnGUI.
* test fix
Adjusting the UnityTransport tests to simulate the NetworkManager invoking the EarlyUpdate and PostLateUpdate methods.
Adding event processing in shutdown primarily for integration testing to handle any pending events prior to shutting down the transport.
This resolves the issue with the UnitTransportConnectionTests failing in areas where it was just waiting and not invoking the EarlyUpdate and PostLateUpdate methods.
* test - fix
Approaching the issue differently by adding a UnityTransportTestComponent that registers with the playerloop update stages needed to properly handle message processing.
* test
Removing the unused additional script and namespace reference.
* test
removing some more unused code and the namespace reference.
* style
removing some CRs and unused local var.
* test - fix
Removing whitespace issue.
Setting velocity to zero after moving and after waiting.
* update
Adding change log entries.
Found the culprit with the transform ownership instability. Moving an object can give it velocity which if there is enough time that passes between updates then fixed update will apply enough velocity motion to move the object and it will continue to move.
Increased mass and linearDampening and setting the linear velocity to zero in the appropriate places.1 parent d709df4 commit 789f375
File tree
9 files changed
+422
-165
lines changed- com.unity.netcode.gameobjects
- Runtime
- Core
- Transports
- UTP
- Tests/Runtime
- NetworkTransform
- Transports
- testproject/Assets/Tests/Manual/SceneTransitioningAdditive
9 files changed
+422
-165
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
294 | 298 | | |
295 | 299 | | |
296 | 300 | | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| 305 | + | |
301 | 306 | | |
302 | 307 | | |
303 | 308 | | |
| |||
379 | 384 | | |
380 | 385 | | |
381 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
382 | 390 | | |
383 | 391 | | |
384 | 392 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
110 | 149 | | |
111 | 150 | | |
112 | 151 | | |
| |||
Lines changed: 33 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
947 | | - | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
948 | 951 | | |
949 | 952 | | |
950 | 953 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | 954 | | |
959 | 955 | | |
960 | 956 | | |
| |||
964 | 960 | | |
965 | 961 | | |
966 | 962 | | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
967 | 966 | | |
968 | 967 | | |
969 | 968 | | |
970 | 969 | | |
971 | 970 | | |
| 971 | + | |
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
975 | 975 | | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
976 | 995 | | |
977 | 996 | | |
978 | 997 | | |
| |||
981 | 1000 | | |
982 | 1001 | | |
983 | 1002 | | |
| 1003 | + | |
984 | 1004 | | |
985 | 1005 | | |
986 | 1006 | | |
| |||
1452 | 1472 | | |
1453 | 1473 | | |
1454 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1455 | 1480 | | |
1456 | 1481 | | |
1457 | 1482 | | |
| |||
0 commit comments