Skip to content

1.5.0

Choose a tag to compare

@Needle-Mirror-Bot Needle-Mirror-Bot released this 23 Apr 11:09

[1.5.0] - 2025-04-22

Added

  • The AutomaticThinClientWorldsUtility class, which facilitates runtime creation (and management) of thin clients. It is available to user-code, and when in PlayType.Server.
  • ClientTickRate.NumAdditionalClientPredictedGhostLifetimeTicks, which can be used to fine-tune/alleviate a common issue where correctly predicted client predicted spawns are de-spawned by the netcode package before they have an opportunity to be classified against their server-side counterparts, which is a common occurrence when said spawns replicate later than expected (which can happen for a variety of reasons). The default behaviour is to have them despawn if they have not been classified by the NetworkTime.InterpolationTick. This value extends this threshold by this many additional ticks. However, if ghosts are frequently unable to replicate by the NetworkTime.InterpolationTick, then your interpolation buffer may be too small. I.e. Consider tweaking ClientTickRate.InterpolationTimeMS (or the InterpolationTimeNetTicks equivalent) first. For further reading, refer to the interpolation docs here.
  • Exposed the k_TickPeriod range constant (defaulting to ±5 ticks) in the default classification system as ClientTickRate.DefaultClassificationAllowableTickPeriod. This may help fix esoteric default classification related errors, particularly when the server is frequently batching ticks (leading to large tick deltas). That said; prefer writing your own classification system, which can take advantage of project-specific GhostField data to more accurately classify predicted spawns.
  • ClientServerBootstrap.AllNetCodeWorldsEnumerator and ClientServerBootstrap.AllClientWorldsEnumerator helpers.
  • Doc on gotcha with custom template serialization and byte alignment.
  • Tests (and a packet dump entry & warning log) covering the case where clients are impacted by the unfathomably rare MaxBaselineAge edge-case.
  • FixedList replication support for RPC, Command, and components (IComponentData, IBufferElementData, IInputComponentData). Some limitation apply, see the doc for further info.
  • unsafe fixed buffer replication support for RPC, Command, and components (IComponentData, IBufferElementData, IInputComponentData). Some limitation apply, see the doc for further info.
  • GhostAuthoringComponent.UseSingleBaseline`, denoting that this prefab type should force 'single baseline' delta-compression during serialization, which can lead to significant CPU savings at the cost of marginally increased bandwidth consumption, particularly for ghosts with many components, and/or with many GhostField's which rarely change.
  • new templates for serializing bytes and short using 8 and 16 bits instead of a full 32 bit data, when they are sent uncompressed.
  • Static-optimized ghosts now report their CanUseStaticOptimization (CUSO) status to the packet dump (including the ComponentType of the first detected changed version), which should aid debugging efforts.
  • Broad packet dump data improvements, at the cost of worsened server performance when enabled.
  • missing documentation in regards what are the fields types for which prediction errors are reported.
  • Documentation and test coverage regarding the GhostGroup feature.
  • Test and doc coverage of [GhostField] C# unions (via [StructLayout(LayoutKind.Explicit)]), which are supported (with many caveats).
  • Test coverage of NetworkStreamSnapshotTargetSize, UTP's MaxMessageSize, and GhostSystemConstants.MaxSnapshotSendAttempts.

Changed

  • Behaviour Breaking Change: The client will now ignore the HandshakeApprovalTimeoutMS until it has completed the Handshake phase, as it should respect this servers value, rather than assuming its own. Relatedly: Be aware that client worlds will not fetch the ClientServerTickRate values from a NetCodeConfig.Global config, they will only accept values sent to it by the server during handshake.
  • Behaviour Breaking Change: The AddCommandData method will now reject inputs with Invalid Tick values, preventing runtime exceptions in rare cases.
  • Behaviour Breaking Change: The DefaultDriverConstructor no longer removes the IPC driver when RequestedPlayType == Server, as thin clients can now be instantiated on DGS builds (assuming supported by user-code).
  • Value Breaking Change: Increased the Lag Compensation Physics CollisionWorld history buffer capacity from 16 ticks to 32 ticks, as the previous buffer was too small for some use-cases. However, the default value (when using LagCompensationConfig.ServerHistorySize:0) remains at 16. Increasing this will allocate more collision worlds, increasing the memory consumption on the ServerWorld, particularly with very large physics scenes, and therefore should only be done if you intend to support high-ping players (i.e. you're often seeing PhysicsWorldHistorySingleton.GetCollisionWorldFromTick clamp a clients history to the last/oldest stored value). Also note the change to the public const PhysicsWorldHistory.RawHistoryBufferMaxCapacity (from 16 to 32).