Commit b2febd1
Unity Technologies
## [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](Documentation~/interpolation.md).
* 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).
1 parent 2215039 commit b2febd1
File tree
418 files changed
+12420
-9840
lines changed- Documentation~
- host-migration
- images
- Editor
- Analytics
- Authoring
- Drawers
- Templates
- DefaultTypes
- Runtime
- Analytics
- Authoring
- Hybrid
- ClientServerWorld
- Command
- Connection
- Debug
- HostMigration
- Hybrid
- Physics
- PredictionTicking
- UpdateRateManagement
- Rpc
- SerializationHelpers
- Simulator
- Snapshot
- Prespawn
- SourceGenerators
- Source~
- Documentation
- NetCodeSourceGenerator
- CodeGenerator
- Generators
- Factories
- Helpers
- Tests
- Templates
- DefaultTypes
- FixedList
- Stats
- Tests
- Editor
- Debugging
- PerformanceTests
- Physics
- Prespawn
- Assets
- Rpc
- SerializationTests
- Runtime
- Utils
- Editor
- ManualTickingSystemGroups
- Proxies
- Utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
418 files changed
+12420
-9840
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
13 | 19 | | |
14 | 20 | | |
15 | 21 | | |
| |||
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
| |||
39 | 36 | | |
40 | 37 | | |
41 | 38 | | |
42 | | - | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
0 commit comments