fix: reset static fields for Fast Enter Play Mode#3956
Merged
Conversation
# Conflicts: # com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs
noellie-velez
commented
Apr 24, 2026
noellie-velez
commented
Apr 24, 2026
noellie-velez
commented
Apr 24, 2026
simon-lemay-unity
approved these changes
Apr 24, 2026
simon-lemay-unity
left a comment
Contributor
There was a problem hiding this comment.
Changes to UnityTransport look good to me.
# Conflicts: # com.unity.netcode.gameobjects/Runtime/Logging/NetworkLog.cs
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 11, 2026
noellie-velez
commented
May 21, 2026
EmandM
reviewed
May 25, 2026
EmandM
left a comment
Member
There was a problem hiding this comment.
This is looking incredible! You've done such good thorough work on this PR. You should be really proud of yourself. ![]()
# Conflicts: # com.unity.netcode.gameobjects/CHANGELOG.md
noellie-velez
commented
May 29, 2026
Comment on lines
+12
to
+16
| #if UNITY_6000_6_OR_NEWER | ||
| [Scripting.LifecycleManagement.AutoStaticsCleanup] | ||
| #endif | ||
| [Serializable] | ||
| public static class NetworkVariableSerialization<T> | ||
| public static partial class NetworkVariableSerialization<T> |
Collaborator
Author
There was a problem hiding this comment.
This is breaking the tests on trunk. It seems AutoStaticsCleanup may be cleaning up after ILPP initialization.
@ShadauxCat, can you confirm whether we actually need to reset those statics?
…gies/com.unity.netcode.gameobjects into chore/fast-enter-playmode
NoelStephensUnity
added a commit
that referenced
this pull request
Jun 10, 2026
* fix: Improved OnValueChanged door example (#3959) * update Updating the door example to provide a more recommended way of using OnValueChanged. * style removing trailing spaces. * Update networkvariable.md Fixes to the example script * Update networkvariable.md Did another pass over this script with some improvements. * style removing trailing whitespace * Apply suggestions from code review Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> --------- Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> * ci: Update of CI dependencies and test fixes (#3970) * corrected Android issue * Updated dependencies * Updated XRAY_PROFILE param to account for latest checks --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> * fix: UniversalRpcTests failing when using IL2CPP backend (#3973) fix Fixing the issue with `UniversalRpcTests` failing on IL2CPP release builds using the "Method Name" stack trace information setting. * feat: Make custom driver construction smoother (#3980) * feat: Make custom driver construction smoother * Add PR number to CHANGELOG entries * Update package version * chore: Change codeowners for UTP (#3982) * chore: Add obsolete warnings to unused or invalid methods (#3987) * chore: Add obsolete warnings to unused or invalid methods * Update CHANGELOG * dotnet-fix * remove duplication of GetRootParentTransform * Remove unrelated change * Leave the public modifiers in place * Update xml doc * chore: Updated aspects of Netcode package in anticipation of v2.12.0 release (#3998) * chore: Replace IsSceneObject with InScenePlaced bool (#4000) * chore: Replace IsSceneObject with InScenePlaced bool * Add XML doc * Update small files * Fix findobjects complaints * Fix tests * Turn off logs * ignore invalid scenes on the scene manager * fix: Add more detailed logging around RPC messages (#3994) * fix: Add more detailed logging around RPC messages * refactor: Logging update (#4002) Update RigidbodyContactEventManager to use new logging system * fix: reset static fields for Fast Enter Play Mode (#3956) * fix: reset static fields for Fast Enter Play Mode support - Added ResetStaticsOnLoad where possible - Applied [AutoStaticsCleanup] to generic classes when applicable - Promoted immutable statics to readonly or const - Added OnDisable to deregister event subscriptions - chore: disable domain reload and remove treat warnings as errors in test project settings - test: add NetworkManager singleton reset test for Fast Enter Play Mode * fix: add missing message type registrations in MessageDelivery * chore: cleanup - Remove unused m_ParentedChildren field and related loops in NetworkTransform - Remove unused m_DespawnedInSceneObjects field in SceneEventData - Replace static quaternion scratch buffer in QuaternionCompressor with local variables - Consolidate LogSerializationOrder and EnableSerializationLogs into LogConfiguration - Update summary comments * docs: update CHANGELOG --------- Co-authored-by: Noel Stephens <noel.stephens@unity3d.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> * fix: end TransportConnect profiler marker on early returns in ConnectEventHandler (#4005) BeginSample was called at the top of ConnectEventHandler but two early return paths (duplicate server transport ID and duplicate client connect event) exited without calling EndSample, causing the 'Missing Profiler.EndSample' error surfaced by the MultipleConnectMessagesNoop playmode tests. * refactor: NetworkAnimator cleanup and code quality improvements (#4001) refactor: cleanup and code quality improvements in NetworkAnimator - Add readonly to fields where applicable - Narrow internal fields and methods to private where applicable - Fix naming casing (TransitionStateinfo, m_DestinationStateToTransitioninfo, field prefixes) - Replace ContainsKey + Add/index lookups with TryAdd/TryGetValue - Remove unused variables and dead code - Improve XML summaries and comment clarity --------- Co-authored-by: Emma <emma.mcmillan@unity3d.com> * chore: replace DEVELOPMENT_BUILD || UNITY_EDITOR with DEBUG (#4006) * update Replacing DEVELOPMENT_BUILD || UNITY_EDITOR with DEBUG. Replacing niche DEVELOPMENT_BUILD uses with DEBUG. * update Removing extra files that didn't need to be included in this PR. * update Adding changelog entry * update Missed the codegen assembly. * update Upgrading our CI ubuntu image to: `package-ci/ubuntu-22.04:v4.86.0`. * Revert "update" This reverts commit 2b010d8. * update bumping ubuntu to use b1.large (segmentation fault was due to running out of memory). * Revert "update" This reverts commit bd1f004. * Reapply "update" This reverts commit 6a434bf. * update Switching PR triggers to use trunk as opposed to the pinned trunk. * Revert "update" This reverts commit 5ce1ef4. * update Moving pinned trunk up a bit. * update Fixing minor merge issues. * update Missed one DEVELOPMENT_BUILD || UNITY_EDITOR usage. --------- Co-authored-by: Amy Reeve <amy.reeve@unity3d.com> Co-authored-by: Michał Chrobot <124174716+michalChrobot@users.noreply.github.com> Co-authored-by: Emma <emma.mcmillan@unity3d.com> Co-authored-by: Simon Lemay <simon.lemay@unity3d.com> Co-authored-by: Netcode team bot <svc-netcode-sdk@unity3d.com> Co-authored-by: Noellie Vélez <noellie.velez@unity3d.com> Co-authored-by: mnachury-unity <120488254+mnachury-unity@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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