fix: reset static fields for Fast Enter Play Mode#3956
Conversation
# Conflicts: # com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs
simon-lemay-unity
left a comment
There was a problem hiding this comment.
Changes to UnityTransport look good to me.
# Conflicts: # com.unity.netcode.gameobjects/Runtime/Logging/NetworkLog.cs
| @@ -44,6 +44,10 @@ public static class QuaternionCompressor | |||
|
|
|||
| // Used to store the absolute value of the 4 quaternion elements | |||
| private static Quaternion s_QuatAbsValues = Quaternion.identity; | |||
There was a problem hiding this comment.
Replace quaternion by 4 ints
There was a problem hiding this comment.
If replacing this quaternion by 4 ints, we would need to rework the index to skip logic (lines 70 to 95)
| DisableNotOptimizedSerializedType = false; | ||
| } | ||
|
|
||
| private void Reset() |
There was a problem hiding this comment.
Add xml doc with:
Used by cref... NetworkManagerHeper this is called by the reset button of the Unity Editor
There was a problem hiding this comment.
Did not manage to have the correct cref link
| @@ -13,6 +16,18 @@ internal class NetworkMetrics : INetworkMetrics | |||
| private const ulong k_MaxMetricsPerFrame = 1000L; | |||
| private static Dictionary<uint, string> s_SceneEventTypeNames; | |||
There was a problem hiding this comment.
this can be made readonly
There was a problem hiding this comment.
s_FrameDispatch too?
| internal static readonly int AnimatorControllerParameterInt; | ||
| internal static readonly int AnimatorControllerParameterFloat; | ||
| internal static readonly int AnimatorControllerParameterBool; | ||
| internal static readonly int AnimatorControllerParameterTriggerBool; |
There was a problem hiding this comment.
This is not being used, are we missing a cacheValue.Type == AnimationParamEnumWrapper.AnimatorControllerParameterTriggerBool check on ReadParameters function (line 1386)?
| /// For debugging delta position and half vector3 | ||
| /// </summary> | ||
| protected delegate void AddLogEntryHandler(ref NetworkTransformState networkTransformState, ulong targetClient, bool preUpdate = false); | ||
| protected AddLogEntryHandler m_AddLogEntry; |
There was a problem hiding this comment.
Is m_AddLogEntry being used?
…gies/com.unity.netcode.gameobjects into chore/fast-enter-playmode
Purpose of this PR
Ensure com.unity.netcode.gameobjects package supports Fast Enter Play Mode
Jira ticket
MTT-14665
Changelog
Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports
N/A