Skip to content

chore: Updated aspects of Netcode package in anticipation of v3.1.0 release - #4182

Closed
svc-netcode-sdk wants to merge 64 commits into
develop-3.x.xfrom
netcode-update-after-3.1.0-release-branch-creation
Closed

svc-netcode-sdk wants to merge 64 commits into
develop-3.x.xfrom
netcode-update-after-3.1.0-release-branch-creation

Conversation

@svc-netcode-sdk

Copy link
Copy Markdown
Collaborator

This PR was created in sync with branching of release/3.1.0. It includes changes that should land on the default Netcode branch (develop-2.0.0) to reflect the new state of the package after the v3.1.0 release:

  1. Updated CHANGELOG.md by adding new [Unreleased] section template at the top and cleaning the Changelog for the current release.
  2. Updated package version in package.json by incrementing the patch version to signify the current state of the package.
  3. Updated package version in ValidationExceptions.json to match the new package version.

Please review and merge this PR to keep the default branch up to date with the latest package state after the release. Those changes can land immediately OR after the release was finalized but make sure that the Changelog will be merged correctly as sometimes some discrepancies may be introduced due to new entries being introduced meantime

NoelStephensUnity and others added 30 commits May 11, 2026 14:44
* 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>
* 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

Fixing the issue with `UniversalRpcTests` failing on IL2CPP release builds using the "Method Name" stack trace information setting.
* feat: Make custom driver construction smoother

* Add PR number to CHANGELOG entries

* Update package version
* 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: 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
Update RigidbodyContactEventManager to use new logging system
* 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>
…EventHandler (#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: 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>
* 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.
* 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.
pets-svc Bot and others added 18 commits August 19, 2026 09:52
* Updated changelog and package version for Netcode in anticipation of v2.13.1 release

* typo in build automation

* trunk shadow changes: com.unity.netcode.gameobjects [skip ci]

* Revert CHANGELOG changes

* Added UNITY_TEST_FRAMEWORK_1_7_OR_NEWER guard and UnityCoreClrExplicitDisabledAttributeShim.cs to make attribute usage possible

* corrected svc bot exclusion

---------

Co-authored-by: netcode-automation <svc-netcode-sdk@unity3d.com>
Co-authored-by: Michał Chrobot <michal.chrobot@unity3d.com>
Co-authored-by: PETS automation <299490404+pets-svc[bot]@users.noreply.github.com>
Co-authored-by: Emma <emma.mcmillan@unity3d.com>
Co-authored-by: unity-renovate[bot] <120015202+unity-renovate[bot]@users.noreply.github.com>
* feat: Disable PMTUD if using DA

* Remove empty spaces

---------

Co-authored-by: Emma <emma.mcmillan@unity3d.com>
…es (#4147)

Overhauling this test since it has been problematic for a long time. The root cause is that the values applied ended forming a discontinuously-linear/saw-tooth motion which makes it very problematic to distinguish a fault from an actual valid interpolation.

The actual solution is to use a smoothed sinusoidal wave that forms a continuous motion that is discernable between a fault and the motion being applied. There were additional order of operation issues that
…polation time (#4130)

* fix: Lerp smoothing frame rate dependence and freeze at maximum interpolation time

The lerp smoothing pass used by the Lerp and SmoothDampening interpolation
types applied a fixed factor of 1.0 minus the maximum interpolation time once
per frame, with no delta time. The wall clock smoothing rate therefore scaled
with the frame rate, so the same setting smoothed by different amounts on
different hardware. The factor is now raised to the number of 60fps reference
frames elapsed, which makes the rate a function of elapsed time. Results at
60fps are unchanged for every legal setting.

Separately, a maximum interpolation time of 1.0 (the upper bound of the
inspector range) produced a factor of exactly 0, so the interpolated value
never advanced and the transform stopped moving entirely on all three axes.
The retained portion is now clamped just below 1.0. This is an independent
defect, as raising 1.0 to any power is still 1.0.

The LegacyLerp path was already frame rate correct and is unchanged. The
documentation on the lerp smoothing fields described the LegacyLerp formula
for all interpolation types and has been corrected.

* update

updating the PR number.

* fix: Only substitute the retention limit at a maximum interpolation time of 1.0

Clamping to k_MaximumLerpSmoothRetention flattened everything above it, so
0.995 smoothed at the same rate as 0.99 and stopped honoring "higher is
smoother". Clamp to the legal range first and substitute only at the
freezing endpoint.

Also corrects the lerp smoothing remarks: LegacyLerp still applies
deltaTime / MaximumInterpolationTime per frame, so the frame rate
independence claim only holds for Lerp and SmoothDampening.
* test: Add NetworkTransform interpolation render time regression test

Adds an integration test that measures how far behind the server clock the
state a non-authority NetworkTransform is interpolating towards was sent.

Only states sent at or before the render time are eligible to be interpolated
towards, and the render time is the server clock minus the tick latency, so
that measurement can never be less than the tick latency. It currently is,
and goes negative, meaning the interpolator is chasing a state that the server
clock says has not happened yet.

An in-process integration test has effectively no round trip time, so the test
first widens the client's local time buffer to separate LocalTime and
ServerTime by a known amount and waits for that separation to take hold.
Without it the two clocks sit close enough together that the test would pass
regardless of which one the render time is derived from.

This commit contains the test only, so it can be run against an unfixed tree.

* fix: Derive NetworkTransform interpolation time from the server clock

A NetworkTransform state's SentTime comes from its NetworkTick, which is a
server tick, but the render time the interpolators were given was derived from
LocalTime. That mixes two clocks. LocalTime leads ServerTime, so subtracting
the tick latency from it lands the render time back at approximately ServerTime
rather than a whole tick latency behind it, and a state's SentTime is floored to
a tick boundary on top of that. The render time therefore sat at or ahead of the
newest state that could exist and the interpolator had nothing to interpolate
towards.

Measuring from ServerTime makes the offset the whole tick latency instead of
whatever is left of it, and is self correcting: as the round trip time grows the
tick latency grows and the render time moves further back with it. This also
matches the rest of the component, which already resets the interpolators using
ServerTime.

This is a no-op on a host or server, where the two clocks are the same, so it
only affects clients.

GetTickLatencyInSeconds returns an absolute time rather than a duration and had
the same defect, so it now derives from ServerTime as well. GetTickLatency is
left alone because it returns a tick count rather than a point in time.

* docs: Condense interpolation render time comments and changelog

Comment and changelog wording only, no behavioral or test logic changes.

Trims the explanation in UpdateInterpolation from twenty one lines to six and
drops the measurement anecdote and the unfilled Jira placeholder, keeping the
reason the server clock is the correct one to measure from. Shortens the test's
remarks and constant comments to match the density of the surrounding tests.

The removed detail, the measurements behind the fix, and the metrics that were
tried and rejected while building the test are recorded outside the repository.

* update

Adding PR number to changelog entries.

* fix: Return a duration from NetworkTransform.GetTickLatencyInSeconds

GetTickLatencyInSeconds returned TimeTicksAgo(...).Time, which is an absolute
network timestamp rather than a duration, so the value grew for as long as the
session ran. It is documented as returning the tick latency in seconds, and
NetworkTimeSystem.TickLatency points at it as a way to inspect that latency, so
the contract was misleading regardless of which clock it was measured from. It
now returns the tick count multiplied by the tick interval.

This also takes the clock question out of this method entirely, since a duration
does not reference LocalTime or ServerTime. The change to derive interpolation
render time from ServerTime now applies only to UpdateInterpolation.

Adds integration tests covering the documented contract: the value tracks the
tick latency rather than elapsed time, and lengthens by exactly the tick
interval for each tick of additional buffering. Both fail against the previous
implementation, the second regardless of how long the session has run, since
buffering more ticks used to make the reported latency smaller.

* style

Removing using directive for UnityEngine as it is an unused namespace.

* test: Tolerate an adaptive tick latency in the tick latency tests

NetworkTimeSystem.TickLatency is recomputed from the averaged round trip time
and can legitimately change mid-run. Both tests assumed it would not, and one
failed on macOS when it moved from two ticks to three, reporting the value as
having gone from 0.0666s to 0.1s.

The duration is now only held to being unchanged across samples where the tick
latency itself did not change, and the buffer offset test accounts for any tick
latency movement between its two samples so that only the buffering is held to
an exact figure.

Both still fail against the previous absolute timestamp implementation.

* test: Address review feedback on the render time and tick latency tests

- Drop the redundant HostOrServer fixture argument and the UseCMBService
  override; Host is the default and a client-server fixture never runs
  under the CMB service.
- Use WaitForSpawnedOnAllOrTimeOut, GetNonAuthorityNetworkManager and
  WaitForTicks instead of hand rolled equivalents.
- There is only ever one connected client, so drop the collections and
  refer to the single non-authority instance directly.
- Fold the two tick latency tests into one and drop the assertion that
  recomputed the implementation's own formula. What is left is what can
  actually regress: the value does not drift with session time, and it
  grows by exactly the ticks added to the interpolation buffer.
Scenes that were already loaded when a session starts were added to
ScenesLoaded but never to the server-to-client scene handle tables, so
UnloadScene passed its ScenesLoaded check and then failed inside
RemoveServerClientSceneHandle. The scene unloaded on every peer, but an
error was logged and the ScenesLoaded entry was never removed.

The client-server branch of the NetworkSceneManager constructor now
registers those scenes the same way InitializeScenesLoaded does for
distributed authority.

NetcodeIntegrationTestHelpers registered the test runner scene in
ServerSceneHandleToClientSceneHandle unconditionally, which now collides
with the constructor already having added it, so that add is guarded.
* fix: half float position encoding manufactures motion on resting objects

NetworkDeltaPosition carries the half float rounding loss of each update
into the next one, which keeps the average transmitted position accurate
while a value is moving. The loss alone is enough to change the encoded
delta, so once the value stops moving that mechanism keeps changing what is
sent even though the position has not moved. The encoded value alternates
between neighbouring representable values and a stationary object is
transmitted as one that oscillates. The rounding loss is now only carried
forward while the value moves by at least one representable step.

MaxDeltaBeforeAdjustment also determined the transmitted resolution, since
a half float's step size grows with its magnitude. At 64 the coarsest step
was 31.25mm, so objects away from their base position were reproduced in
~3cm increments. At 2 it is 0.977mm. Folding the delta into the base more
often costs no bandwidth with reliable deltas because both sides apply the
same rule to the same value, and the reconstructed position is unchanged by
the fold. UseUnreliableDeltas forces a full precision base synchronization
per fold, so those projects will send those more often.

Measured on 10 settling physics objects with half float enabled: 28-42mm of
oscillation before, none after, matching the same scene with half float
disabled. Objects in motion improve as well, peak error dropping from
12.5mm to 0.587mm.

Sender and receiver must agree on MaxDeltaBeforeAdjustment, so this is not
compatible across builds. NetworkConstants.PROTOCOL_VERSION already
participates in the connection config hash, so mismatched versions cannot
connect.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* test: integration coverage for half float position encoding

Two NetcodeIntegrationTest cases, one for an object moving in steps too
small for the encoding to represent and one for an object at rest. Both
move the authority forwards only and require non-authority instances to
follow without ever moving backwards. Interpolation cannot overshoot, so
movement opposite to the authority's has to have come from the encoding.
That also avoids a tolerance that would need revisiting whenever the
resolution changes.

Two setup details are needed for these to detect anything. The object has to
travel away from the base position established when it spawned, since
resolution is fine near the base. It then has to step by an amount the
encoding cannot represent before coming to rest, because a position a half
float represents exactly leaves no rounding loss and so cannot exhibit the
problem: resting on 30.0 produces no backwards movement at all while resting
on 30.0007 produces 15.6mm.

Verified in both directions. Without the fix all four cases fail on the
intended assertion, reporting 7.9mm to 10.1mm of backwards movement. With
the fix all four pass.

These do not use the time travel harness because the behavior only appears
over multiple real state update and interpolation cycles.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Update CHANGELOG for NetworkTransform precision changes

Updated changelog entries for NetworkTransform.UseHalfFloatPrecision to reflect changes in issue tracking numbers.

* test - update

Adding better coverage and adjusting some of the test to better leverage from NetcodeIntegrationTest helper methods.

* test - update

Moving the NetworkDeltaPositionTests into its own file.

* update

Bumping the protocol version to assure legacy clients cannot connect to a session with the fixes. While the fixes aren't technically a "breaking change", any projects using the legacy lerp will end up with an offset from the expected final position.  Since motion continually feeds the full position (half float or full precision) as deltas this would prevent from "long term drift".
Either case, updating the protocol version only assures that clients of a previous version cannot connect to a session with the newer version.

* test: Refer to the single non-authority instance directly

There is one connected client, so the per instance dictionaries and the
loops over m_NetworkManagers only ever held one entry. Resolve the
non-authority instance once through GetNonAuthorityNetworkManager and
name the two sampling frame counts that were inline literals.

* update

Removed note about why we don't use time travel (too verbose).

Enabling this on the CMB service pass to validate this works as expected against a live session.

* test: Drop two NetworkDeltaPosition tests that cover an already covered path

ADeltaUnderTheThresholdIsLeftAsADelta asserted nothing the other tests do
not: MovingFoldsThePreviousRoundingLossBackIn already requires the delta
to stay under the threshold, and UnsynchronizedAxesAreLeftUntouched
already requires the synchronized axis to hold the movement.

QuantumDropsTheSignBecauseTheLatticeIsSymmetric ran its own value list to
assert one thing, so it moves into the loop in
QuantumIsTheSmallestChangeTheEncodingCanSee, which already walks the same
kind of values. 300f joins that list so no input is lost.

The masking it covers is a common path executed by every call, so the
coverage score is unchanged either way.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* Updated changelog and package version for Netcode in anticipation of v2.13.1 release

* typo in build automation

* trunk shadow changes: com.unity.netcode.gameobjects [skip ci]

* typo

---------

Co-authored-by: netcode-automation <svc-netcode-sdk@unity3d.com>
Co-authored-by: Michał Chrobot <michal.chrobot@unity3d.com>
Co-authored-by: PETS automation <299490404+pets-svc[bot]@users.noreply.github.com>
* corrected using statements for standards check

* yaml fix

* yaml fix
* Added Wrench cap on supported editors

* CI adjustments for new editor setup

* Updated Wrench and regenerated recipes

* typo

* Disabled more CoreCLR tests

* Adjusted pr-supervisor

* Added branch to github workflows
* Initial BuildAutomation module implementation

* Renamed Wrench settings for beter readibility

* Updated MinSupportedEditorBySample values
…rity nested NetworkTransforms (#4169)

* fix

Fixing issue where a `NetworkObject` with nested `NetworkTransform` components using different `NetworkTransform.AuthorityMode` settings stop updating non-authority instances, because the first authority instance removes the entire `NetworkObject` from the update registration.

* test

The tests that validate this fix.

* update

Adding changelog entry

* style

Updating comments for clarity

* fix

Addressing the u-pr bot's findings.

* test

Adding a test to validate the, now fixed, gap u-pr bot found.

* update

Applying u-pr's suggestion to this test.

* test: collapse the mixed authority fixtures and add GetManagersInstance

The root authority mode moved from a TestFixture argument into an array
walked inside the test, which takes the fixture count from 4 to 2 and the
case count from 8 to 2. Only HostOrServer still needs a session per value.

That required moving the nested NetworkTransform components off the player
prefab and onto two prefabs spawned and despawned per case, so the owner is
now an explicit client rather than every player in turn.

NetcodeIntegrationTest gains GetManagersInstance for resolving a NetworkObject
relative to a NetworkManager, which asserts rather than throwing
KeyNotFoundException when the instance is missing.

* Update com.unity.netcode.gameobjects/CHANGELOG.md

Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>

* update

---------

Co-authored-by: u-pr[bot] <205906871+u-pr[bot]@users.noreply.github.com>
@u-pr

u-pr Bot commented Oct 4, 2026

Copy link
Copy Markdown

⚠️ Some settings were ignored in '.pr_agent.toml (repository root)' repo settings

Check the configuration's TOML syntax, permitted settings, and size limit. See the error below.


Error message:
Ignored prohibited settings: github_app.handle_pr_actions. Permitted settings were applied.

Configuration content:
# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/

[github_app]
handle_pr_actions = ['opened', 'ready_for_review']  # PR events that auto-run pr_commands
pr_commands       = ["/harness-review"]             # what runs on those events
reviewer_commands = ["/harness-review"]             # what runs when @u-pr is added as reviewer

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Needs changes

The update restores the Unreleased changelog template and advances the package version, but the release entry does not match the version line of the target branch.

Reviewed commit 351178d

🤖 Helpful? 👍/👎

### Obsolete


## [3.1.0] - 2026-10-04

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1

This PR targets develop-2.0.0 and advances its package manifest to 2.13.5, but moves the only Unreleased fix into a 3.1.0 entry. A 2.x package built from this branch would contain the fix while its changelog attributes it solely to a 3.x release. Apply the 3.1.0 changelog transition on the 3.x branch, or keep this fix Unreleased here until the corresponding 2.x release.

🤖 Helpful? 👍/👎

@michalChrobot
michalChrobot changed the base branch from develop-2.0.0 to develop-3.x.x October 4, 2026 00:32
@michalChrobot

Copy link
Copy Markdown
Member

wrongly created

@michalChrobot
michalChrobot deleted the netcode-update-after-3.1.0-release-branch-creation branch October 4, 2026 00:33
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.

10 participants