Repository navigation
feat: batched NetworkTransform synchronization, one message per tick (batched transforms 5/5) - #4235
Draft
NoelStephensUnity wants to merge 3 commits into
Conversation
Last of five PRs that replace #4123. With NetworkConfig.TransformSyncMode set to Batched, NetworkTransformStateManager detects changes for every registered instance in one Burst job, the server sends one NetworkTransformBatchMessage per observing client per tick, and non-authority instances interpolate in a job. Rigidbody driven and nested instances stay on the per-instance path. NetworkTransformSyncModeParityTests runs both modes side by side.
This was referenced Oct 29, 2026
refactor: NetworkTransform delta detection as static job-safe methods (batched transforms 2/5)
#4232
Draft
…atched-transform-5-batched-send-path
This branch has not been deployed
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
Turns on the batched synchronization mode. With
NetworkConfig.TransformSyncModeset toBatched, one Burst job checks everyNetworkTransformfor changes and the server sends one message per observing client per tick, instead of one message per instance. Batched mode can save up to ~54% of transform bandwidth. It is off by default and there are no breaking changes.Stack (replaces #4123, review in order): #4231 math and handles → #4232 static delta check → #4233 native interpolator and sync mode setting → #4234 blittable state and reliability → #4235 batched send path. Each PR targets the branch of the one before it; the diff shown is that PR alone.
PR Scope:
NetworkTransformStateManager: owns the native state for registered instances, runsDetectTransformDeltaJobandInterpolateTransformJob, and assembles the batch per observing client.NetworkTransformBatchMessage: carries every changed state for one client, keyed by the compact transform handle from feat: job-safe transform math and transform handle allocator (batched transforms 1/5) #4231.NetworkManagercapturesTransformSyncModewhen a session starts, so the value the session starts with applies for the whole session and a mid-session write has no effect.NetworkTransformregisters with the state manager in batched mode and serializes its transform handle on spawn.What stays on the per-instance path
These are routed automatically, with no configuration, even when batched mode is on:
NetworkRigidbodyuses "Use Rigidbody for Motion" (a job cannot read a Rigidbody's pose).NetworkTransforminstances, which their parent already ticks.NetworkTransform.UseUnreliableDeltasdoes not apply in batched mode. Delivery is decided per state update rather than per component.Out of scope:
Jira ticket
N/A
Changelog
NetworkConfig.TransformSyncMode, which determines whetherNetworkTransforminstances detect and synchronize their state individually or as a single batched message per tick.Documentation
NetworkConfig.TransformSyncMode, how to set it, that every peer has to match, and which instances stay on the per-instance path.Testing & QA (How your changes can be verified during release Playtest)
NetworkTransformSyncModeParityTestsruns the same scenarios through both modes and both authority models: motion, client-owned instances, teleports,NetworkHide/NetworkShowobserver filtering, ownership changes, and despawn/respawn.NetworkTransformSyncModeConfigurationTestschecks the selected mode is the one used at runtime.Playtest suggestion: run a scene with many moving
NetworkTransformobjects once in each mode and confirm motion looks identical. Include aNetworkRigidbodyand a parented object, since those take the per-instance path.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?Up-port
N/A (develop-3.x.x only).
Backports
No backport is required.