Skip to content

chore: [NGOv3.X] Up-port until 2.13.1#4099

Merged
michalChrobot merged 19 commits into
develop-3.x.xfrom
chore/up-port-NGO-2-x
Jul 24, 2026
Merged

chore: [NGOv3.X] Up-port until 2.13.1#4099
michalChrobot merged 19 commits into
develop-3.x.xfrom
chore/up-port-NGO-2-x

Conversation

@michalChrobot

@michalChrobot michalChrobot commented Jul 24, 2026

Copy link
Copy Markdown
Member

Purpose of this PR

This PR replaces #4082 and up-ports all changes that landed until NGOv2.13.1 release
image

Note that I wouldn't "squash and merge" but rather create a merge commit for easier history tracking (landing those cherry-picked commits as separate history entries)

Jira ticket

N/A

Documentation

N/A

Testing & QA (How your changes can be verified during release Playtest)

Green CI pass

Up-port

This is an up-port for bunch of PRs

Backports

N/A

svc-netcode-sdk and others added 19 commits July 24, 2026 11:30
* fix

Fixing issue where Rigidbody2D was not applying rotation correctly. (4009)
Fixing issue where `NetworkRigidbodyBase` was always checking the 3D rigid body's interpolation mode when determining if it is kinematic and needs to put the rigid body to sleep and then switch to interpolation. (3924)

* style

Removing static using directive (not used).

* update

Missed the return...

* test

Did a bit of an overhaul on the original NetworkRigidbodyTest. It should now run with distributed authority tests and includes a 2D rigidbody in the tests as well.

* stye

Removing trailing space on comment

* test

Updating the NetworkRigidbodyTest to do a 2nd spawn pass that swaps the session owner and non-session owner clients to validate it works when a non-session authority client is the spawn authority.

* update

Removing Rigidbody tests no longer used and already covered by `NetworkRigidbodyTests`.
Moving `RigidbodyContactEventManagerTests` into its own file.
* changelog correction

* Wrench and deps update and CI regeneration

* corrected editors

* Addressed Standards check complains
…#4029)

- Made list fields readonly
- Reduced method visibility from internal to private where applicable
- Replaced indexed for loops with foreach and inlined out variable declarations
- Replaced ContainsKey + indexer with TryGetValue
- Removed unused totalBytes variable
)

refactor: precalculate HasAuthority into cached m_HasAuthority field
- Replaced InternalHasAuthority() with private m_HasAuthority field
- Set m_HasAuthority on Spawn (before SpawnInternal), cleared on despawn, updated on ownership change
- Replaced all internal HasAuthority call sites with direct m_HasAuthority field access
- Updated public HasAuthority property to return cached value when spawned
- Moved network object setup from NetworkSpawnManager.SpawnNetworkObjectLocallyCommon to NetworkObject.SetupOnSpawn

* fix vettng test

---------

Co-authored-by: Emma <emma.mcmillan@unity3d.com>
* fix

This fixes an edge case scenario with string reading where if user code has caused the character count to have been already read prior to attempting to read a string value (safely or unsafely) and then reading the string can result in the signed integer size to roll over to a negative value and thus causing the reader to attempt to read into restricted memory outside of the application domain which results in the editor crashing.

The fix catches this scenario and throws an overflow exception prior to attempting to read into negative memory space relative to the application domain.

* test

This test validates the fix.

* update

Adding changelog entry.

* update

Making the reader use the already calculated readSize.

* test

Updating test to unsafely read a string under the same condition.

* fix

Fixing an issue where the unsafe string read needs to create an empty string based on the character count and not the byte count.

* refactor

Based on Paolo's suggestion on combining the string size, in bytes, validation script to a single in-lined method shared between the safe and unsafe string read methods.
Also combined the actual reading of the string data into a single in-lined method.

* style

Removing the auto-added (and not used) UnityEngine.UIElements using directive.

* style

updated comments and renamed CheckIfValidStringLength to ValidateStringByteCount.

* test

Removing the added 3 bytes used for earlier debugging purposes.

* style

spelling/typo fix.
whitespace after sentence in comment fix.

* refactor

Based on Emma's suggestion, removing the `SizeOfLengthField` method and `TryBeginReadInternal` check within the ReadValueSafe (string) method and replacing that with `ReadLengthSafe`.

* Update com.unity.netcode.gameobjects/Runtime/Serialization/FastBufferReader.cs

Co-authored-by: Emma <emma.mcmillan@unity3d.com>

* update

Based on suggestion from Emma, removing InBitwiseContext check since this is done in both ReadLengthSafe and TryBeginReadInternal.

---------

Co-authored-by: Emma <emma.mcmillan@unity3d.com>
fix: remove dead API doc links to internal scene event types (UUM-131558)

The NetworkSceneManager class summary and SceneEventDelegate XML docs
referenced the internal types SceneEventMessage and SceneEventData via
<see cref>, which generate hyperlinks in the DocFX-generated API docs.
Because those types are internal they have no public documentation
pages, so the links resolved to missing pages.

Convert the descriptive class-summary references to inline code (<c>)
and drop the internal SceneEventData entry from the SceneEventDelegate
'See also' list (a user cannot reference an internal type), keeping the
public SceneEvent link.
* fix: Serialization docs

* Apply suggestions from code review

Co-authored-by: Amy Reeve <amy.reeve@unity3d.com>

* Apply suggestion from @jabbacakes

Co-authored-by: Amy Reeve <amy.reeve@unity3d.com>

* small changes

* Fix pvp exceptions

* Fix pvp errors

* Fix formatting

* Use RuntimeInitializeOnLoad

* fix the tests

* Fix tests v2 electric boogaloo

* Add details in README files

---------

Co-authored-by: Amy Reeve <amy.reeve@unity3d.com>
* fix: NullReferenceExceptions in spawn path

* Update NetcodeIntegrationTest

* Update CHANGELOG.md

* put back serialization code
* Fix code coverage command in YAML configuration

Coverage reporting was not setup due to this

* Moving CodeCov check to daily trigger

---------

Co-authored-by: Michał Chrobot <michal.chrobot@unity3d.com>
…t as active (#4065)

* fix - NetworkObject null exception on warning log

If the NetworkObject was not found then use "null" as the name of the NetworkObject.

* fix - synchronizing clients should always load active scene first

This fixes the issue where the active scene could end up not being the 1st scene loaded which upon loading the active scene and previously SceneEventData relative loaded scenes would get unloaded when loading the active scene since this will can end up being loaded in SingleMode.

* fix - prevent marking dynamically spawned objects as in-scene

This fix just ignores any spawned objects when setting any just loaded InScenePlaced objects while running in the editor.

* style

finishing an incomplete comment

* update

Removing the changes as this will be fixed in a separate PR.

* update

Change log entry.
* Added CodeCoverage job to run on PRs to enable coverage check

* Updated trunk version

* Updated CI deps and regenerated recipes

* Removed develop branch from Renovate updates

* Added renovate grouping

* Disabled StopAndStartMotion test

* fixes from tests

1) Updated Nintendo SDK
2) Corrected standards check for minimalproject
3) Increased the timeout of WaitForNetworkEvent for lower end devices

* Disabled Switch due to build failures

* fixes

* corrected standards

* typo

* reverted change
* fix: InScenePlaced edge cases

* Fix tests

* Dont use scene origin if it isn't valid

* Fix tests

* Fix build error

* Ensure spawn count is reset on NetworkManager shutdown

* Fix broken test
Added up-port section to a PR

Co-authored-by: Noel Stephens <noel.stephens@unity3d.com>
)

* fix

Adding bounds check for reading NetworkAnimator parameters.

* test

Adding a unit test to validate the bounds check.

* update

adding change log entry

* style

adding additional comments for clarity on what the test is doing.
* update

adding single player session section under the configuration area after transports.

* Refactor ExtendedNetworkManager for single player

Rearranged variable declarations and removed StartSinglePlayer method.

* update

Using the newer approach to adding examples where the example script lives in the same integration test file that tests the example to assure it is always a working example.

* update

Adding change log entry.

* Change class visibility to internal for example class

---------

Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
@codecov-github-com

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 57.71670% with 200 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...eobjects/Runtime/SceneManagement/SceneEventData.cs 28.23% 61 Missing ⚠️
....netcode.gameobjects/Runtime/Core/NetworkObject.cs 58.87% 51 Missing ⚠️
...cts/Runtime/SceneManagement/NetworkSceneManager.cs 44.00% 28 Missing ⚠️
...le/Serialization/TypedSerializerImplementations.cs 25.00% 15 Missing ⚠️
.../Runtime/Components/AnticipatedNetworkTransform.cs 84.94% 14 Missing ⚠️
...gameobjects/Runtime/Configuration/NetworkPrefab.cs 14.28% 12 Missing ⚠️
...ameobjects/Runtime/Spawning/NetworkSpawnManager.cs 54.54% 10 Missing ⚠️
....netcode.gameobjects/Runtime/Logging/NetworkLog.cs 73.07% 7 Missing ⚠️
...meobjects/Runtime/Messaging/ILPPMessageProvider.cs 0.00% 1 Missing ⚠️
...time/SceneManagement/DefaultSceneManagerHandler.cs 0.00% 1 Missing ⚠️
@@               Coverage Diff                @@
##             develop-3.x.x    #4099   +/-   ##
================================================
  Coverage                 ?   70.44%           
================================================
  Files                    ?      146           
  Lines                    ?    23275           
  Branches                 ?        0           
================================================
  Hits                     ?    16396           
  Misses                   ?     6879           
  Partials                 ?        0           
Flag Coverage Δ
NGOv2_ubuntu_6000.3 70.44% <57.71%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ponents/Interpolator/BufferedLinearInterpolator.cs 86.31% <100.00%> (ø)
...gameobjects/Runtime/Components/NetworkTransform.cs 81.21% <100.00%> (ø)
...cts/Runtime/Connection/NetworkConnectionManager.cs 80.62% <100.00%> (ø)
...me/Messaging/Messages/ConnectionApprovedMessage.cs 66.26% <100.00%> (ø)
.../Runtime/Messaging/Messages/CreateObjectMessage.cs 78.84% <100.00%> (ø)
...eobjects/Runtime/Serialization/FastBufferReader.cs 80.04% <100.00%> (ø)
...meobjects/Runtime/Spawning/NetworkPrefabHandler.cs 61.26% <100.00%> (ø)
...meobjects/Runtime/Messaging/ILPPMessageProvider.cs 58.13% <0.00%> (ø)
...time/SceneManagement/DefaultSceneManagerHandler.cs 20.86% <0.00%> (ø)
....netcode.gameobjects/Runtime/Logging/NetworkLog.cs 73.01% <73.07%> (ø)
... and 7 more
Components Coverage Δ
com.unity.netcode.gameobjects 70.44% <0.00%> (?)

ℹ️ Need help interpreting these results?

@michalChrobot
michalChrobot merged commit 34eaea2 into develop-3.x.x Jul 24, 2026
28 checks passed
@michalChrobot
michalChrobot deleted the chore/up-port-NGO-2-x branch July 24, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants