Skip to content

Commit 4f47402

Browse files
author
Unity Technologies
committed
## [1.11.0] - 2025-12-12 ### Added * New Prefab List menu item and playmode tools button to quickly list all ghost prefabs in your project or scene hierarchy. * Internal changes to support GameObject ghosts. More to come later. See Discussions post talking more about this work in progress. * [Potential Breaking Change] Moving server side's ghost spawn writes from BeginFrame ECB to new PresentationGroup ECB. * [Potential Breaking Change] GhostAuthoringComponent's content has been moved to a base class. * Netcode profiler received new tooltips and warning icons. These will show if compression efficiency is low or the snapshot size is approaching max message size. * Static ghosts now aggressively attempt to avoid looking up snapshot data (via `SnapshotData.GetDataAtTick`) inside the `GhostUpdateSystem.UpdateJob`, and the job itself early outs if there are no ghosts needing to restore, leading to a ~90% reduction in job timings. Profiler markers have also been added to this job, denoting which ghost types (and API calls) are taking the time. * Users can now migrate non ghost data using the `IncludeInMigration` component and the associated `NonGhostMigrationComponents` buffer. * Non-Ghost Components marked for migration on a Ghost Entity will now be automatically migrated to the correct Ghost. ### Changed * Corrected ghost-types-templates docs regarding the packed vs unpacked format of `bool`, `byte`, `sbyte`, `float`, and `double`. * Improved the `bool` serialization template, improving packed and unpacked costs (~4 bits to 1 bit, and 32 bits to 8 bits, respectively). ### Fixed * An issue with static optimized ghosts, where incorrect logic in the `GhostUpdateSystem` caused them to not have their `CopyFromSnapshot` called even once in rare cases, which led to `[GhostFields]` like `StaticAsteroid.SpawnTick` (which need additional processing via the `CopyFromSnapshot` code-gen) to be incorrect on the client. * `NetworkEndpoint` serialization inside GhostField's, which were mistakenly using `SerializeNetworkEndpointUnpacked` in a packed case. * Missing average per entity column for per ghost type overhead sections in the profiler.
1 parent 1db5682 commit 4f47402

File tree

193 files changed

+7456
-849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+7456
-849
lines changed

.attestation.p7m

-1 Bytes
Binary file not shown.

.signature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"timestamp":1763565376,"signature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45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"}

CHANGELOG.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22
uid: changelog
33
---
44

5+
## [1.11.0] - 2025-12-12
6+
7+
### Added
8+
9+
* New Prefab List menu item and playmode tools button to quickly list all ghost prefabs in your project or scene hierarchy.
10+
* Internal changes to support GameObject ghosts. More to come later. See Discussions post talking more about this work in progress.
11+
* [Potential Breaking Change] Moving server side's ghost spawn writes from BeginFrame ECB to new PresentationGroup ECB.
12+
* [Potential Breaking Change] GhostAuthoringComponent's content has been moved to a base class.
13+
* Netcode profiler received new tooltips and warning icons. These will show if compression efficiency is low or the snapshot size is approaching max message size.
14+
* Static ghosts now aggressively attempt to avoid looking up snapshot data (via `SnapshotData.GetDataAtTick`) inside the `GhostUpdateSystem.UpdateJob`, and the job itself early outs if there are no ghosts needing to restore, leading to a ~90% reduction in job timings. Profiler markers have also been added to this job, denoting which ghost types (and API calls) are taking the time.
15+
* Users can now migrate non ghost data using the `IncludeInMigration` component and the associated `NonGhostMigrationComponents` buffer.
16+
* Non-Ghost Components marked for migration on a Ghost Entity will now be automatically migrated to the correct Ghost.
17+
18+
### Changed
19+
20+
* Corrected ghost-types-templates docs regarding the packed vs unpacked format of `bool`, `byte`, `sbyte`, `float`, and `double`.
21+
* Improved the `bool` serialization template, improving packed and unpacked costs (~4 bits to 1 bit, and 32 bits to 8 bits, respectively).
22+
23+
### Fixed
24+
25+
* An issue with static optimized ghosts, where incorrect logic in the `GhostUpdateSystem` caused them to not have their `CopyFromSnapshot` called even once in rare cases, which led to `[GhostFields]` like `StaticAsteroid.SpawnTick` (which need additional processing via the `CopyFromSnapshot` code-gen) to be incorrect on the client.
26+
* `NetworkEndpoint` serialization inside GhostField's, which were mistakenly using `SerializeNetworkEndpointUnpacked` in a packed case.
27+
* Missing average per entity column for per ghost type overhead sections in the profiler.
28+
529
## [1.10.0] - 2025-11-09
630

731
### Added
@@ -27,8 +51,6 @@ uid: changelog
2751
* Shorts are now properly supported in components and commands.
2852
* Missing Physics-related API docs have been re-added.
2953

30-
31-
3254
## [1.9.1] - 2025-10-11
3355

3456
### Changed

Documentation~/TableOfContents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* [Host migration API and components](host-migration/host-migration-api.md)
3434
* [Add host migration to your project](host-migration/add-host-migration.md)
3535
* [Host migration requirements](host-migration/host-migration-requirements.md)
36+
* [Host migration considerations](host-migration/host-migration-considerations.md)
3637
* [Host migration systems and data](host-migration/host-migration-systems.md)
3738
* [Lobby and Relay integration](host-migration/lobby-relay-integration.md)
3839
* [Limitations and known issues](host-migration/host-migration-limitations.md)

Documentation~/command-stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ For example, if a client predicted spawns a missile, then, although that client
2222
2323
The recommended method for handling user inputs is to create an input component data struct that inherits the [`IInputComponentData`](https://docs.unity3d.com/Packages/com.unity.netcode@latest?subfolder=/api/Unity.NetCode.IInputComponentData.html) interface. Then you can add command data to the buffer and retrieve it when processing. Unity handles inputs automatically through code-generated systems, as long as you set up the input gathering and input processing systems separately.
2424

25-
Because the input struct implementing `IInputComponentData` is baked by `ICommandData`, [the 1024 bytes limit for the payload](#ICommandData-serialization-and-payload-limit) also applies.
25+
Your `IInputComponentData` component needs to be on the target ghost at baking time, then Netcode for Entities baking will set up and generate appropriate commands and serializers for you. Because the input struct implementing `IInputComponentData` is baked by `ICommandData`, [the 1024 bytes limit for the payload](#ICommandData-serialization-and-payload-limit) also applies.
2626

2727
> [!NOTE]
2828
> Per prefab overrides done in the ghost authoring component inspector are disabled for input components and their companion buffer. You can add a ghost component attribute on the input component in code and it will apply to the buffer as well.

Documentation~/ghost-types-templates.md

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ Some types have multiple templates that provide alternative ways to serialize th
8989

9090
For types with multiple templates, the available options are as follows:
9191

92-
| Setting | Options | Description |
93-
|---|---|---|
94-
| Quantization | Quantized or unquantized | Quantization involves limiting the precision of data for the sake of reducing the number of bits required to send and receive that data. For example, a float value `12.456789` with a quantization factor of `1000` is sent as `int 12345`. Unquantized means the float is sent with full precision. Refer to [quantization](compression.md#quantization) for more details. |
95-
| Smoothing method | `Clamp`, `Interpolate`, or `InterpolateAndExtrapolate` | Smoothing method specifies how a new value is applied on the client when a snapshot is received. Refer to the [`SmoothingAction` API documentation](https://docs.unity3d.com/Packages/com.unity.netcode@latest?subfolder=/api/Unity.NetCode.SmoothingAction.html) for more details. |
92+
| Setting | Options | Description |
93+
|------------------|--------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
94+
| Quantization | Quantized or unquantized | Quantization involves limiting the precision of data for the sake of reducing the number of bits required to send and receive that data. For example, a float value `12.456789` with a quantization factor of `1000` is sent as `int 12345`. Unquantized means the float is sent with full precision. Refer to [quantization](compression.md#quantization) for more details. |
95+
| Smoothing method | `Clamp`, `Interpolate`, or `InterpolateAndExtrapolate` | Smoothing method specifies how a new value is applied on the client when a snapshot is received. Refer to the [`SmoothingAction` API documentation](https://docs.unity3d.com/Packages/com.unity.netcode@latest?subfolder=/api/Unity.NetCode.SmoothingAction.html) for more details. |
9696

9797
Each of these options changes how the original value is serialized, deserialized, and applied on the client, and each template uses different, named regions to handle these cases. The code generator chooses the appropriate regions to generate, and bakes your user-defined serialization settings for fields on your types directly into the serializer for your type. You can explore these generated types in the projects' `Temp/NetCodeGenerated` folder (note that they're deleted when Unity is closed).
9898

@@ -109,7 +109,9 @@ When fixed-size list are serialized in RPC/Command or as a field in replicated c
109109
| IInputComponentData | 64 |
110110

111111
When fixed-size list fields are replicated in RPCs the maximum allowed capacity (and thus length) for any fixed size list field element is limited to 1024 elements.
112-
> Remark: Notice that becase sending RPC larger than 1MTU is not currently supported, the packet size induce an instrisict limitation on the maximunumber of serializable elements that can be way lower than 1024.
112+
113+
> [!NOTE]
114+
> Sending an RPC larger than the max transmission unit (MTU) isn't supported. This limitation on packet size means that the maximum number of serializable elements can be lower than 1024, depending on the [size of your MTU](https://docs.unity3d.com/Packages/com.unity.transport@latest?subfolder=/api/Unity.Networking.Transport.NetworkParameterConstants.html#Unity_Networking_Transport_NetworkParameterConstants_MTU).
113115
114116
When fixed-size list fields are replicated in `IComponentData`, `IBufferElementData`, `ICommandData` and `IInputComponentData` the maximum allowed fixed-list capacity is capped to 64 elements.
115117

@@ -129,10 +131,10 @@ The cap (of 64) is intentional; it is a good compromise between flexibility (as
129131

130132
For Inputs (commands) the common use case we are optimizing for is that input should be in general small. So we preferred to enforce the rule to constrain input size. Further, because inputs can be replicated for other players (via the presence of the `[GhostField]` attribute - and associated `GhostComponent` flags), we would had a very strange and non-uniform behaviour in such case.
131133

132-
#### Why don't RPCs have a larger maximum allowed capacity ?
134+
#### Why don't RPCs have a larger maximum allowed capacity?
133135
The main reasons are:
134-
- RPCs are meant to be sent unfrequently
135-
- They our most flexible and unique tool for message passing.
136+
- RPCs are meant to be sent infrequently.
137+
- They are the most flexible tool for message passing.
136138
- They don't have any particular needs for complex change mask generation that justify applying the limit either.
137139

138140
## How types are serialized
@@ -141,23 +143,26 @@ Netcode for Entities serialize the supported types over the network by using eit
141143
"un-packed" (full bits) format.
142144

143145
#### packed vs unpacked format
144-
| Type | unpacked | packed |
145-
|----------------|-------------------|-------------------------------------------------------------------------------|
146-
| sbyte | 32 bit | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
147-
| short | 16 bit | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
148-
| int | 32 bit | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
149-
| long | 64 bit | zig-zag encoded, 2 x (4 bits + variable size payload (huffman/golomb bucket)) |
150-
| byte | 32 bit | 4 bits + variable size payload (huffman/golomb bucket) |
151-
| uint | 32 bit | 4 bits + variable size payload (huffman/golomb bucket) |
152-
| ushort | 16 bit | 4 bits + variable size payload (huffman/golomb bucket) |
153-
| ulong | 64 bit | 2 x (4 bits + variable size payload (huffman/golomb bucket)) |
154-
| float | 32 bit | 0: 1bit otherwise 32 bits |
155-
| double | 64 bit | 0: 1bit otherwise 64 bits |
156-
| FixedStringXXX | 8bit + len * 8bits | 4 bits + varialbe size payload (len) + len * (4 bits + varialbe size payload) |
157-
| float2 | 2 * 32bits | 2 * packed float size |
158-
| float3 | 3 * 32bits | 3 * packed float size |
159-
| float4 | 4 * 32bits | 4 * packed float size |
160-
| quaternion | 4 * 32bits | 4 * packed float size |
146+
| Type | unpacked | packed |
147+
|-------------------------|---------------------|-----------------------------------------------------------------------------------------|
148+
| bool | 8 bits | 1 bit |
149+
| sbyte | 8 bits | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
150+
| short | 16 bits | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
151+
| int | 32 bits | zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
152+
| long | 64 bits | zig-zag encoded, 2 x (4 bits + variable size payload (huffman/golomb bucket)) |
153+
| byte | 8 bits | 4 bits + variable size payload (huffman/golomb bucket) |
154+
| uint | 32 bits | 4 bits + variable size payload (huffman/golomb bucket) |
155+
| ushort | 16 bits | 4 bits + variable size payload (huffman/golomb bucket) |
156+
| ulong | 64 bits | 2 x (4 bits + variable size payload (huffman/golomb bucket)) |
157+
| float (full precision) | 32 bits | 0: 1bit otherwise 32 bits |
158+
| float (quantized) | 32 bits | quantized, then zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
159+
| double (full precision) | 64 bits | 0: 1bit otherwise 64 bits |
160+
| double (quantized) | 64 bits | quantized, then zig-zag encoded, 4 bits + variable size payload (huffman/golomb bucket) |
161+
| FixedStringXXXBytes | 8bits + len * 8bits | 4 bits + variable size payload (len) + len * (4 bits + variable size payload) |
162+
| float2 | 2 * 32bits | 2 * packed float size |
163+
| float3 | 3 * 32bits | 3 * packed float size |
164+
| float4 | 4 * 32bits | 4 * packed float size |
165+
| quaternion | 4 * 32bits | 4 * packed float size |
161166

162167
### How to support unions
163168
The `[GhostField]` attribute enables two netcode sub-systems; serialization, and client prediction (backup & restoring).

Documentation~/host-migration/host-migration-api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Understand the host migration API, components, and component options.
1818
| `HostMigrationInProgress` | This component is used to detect when a host migration is in progress and when it's complete. |
1919
| `HostMigrationConfig` | A singleton component that exposes a few options to modify in the host migration system. |
2020
| `HostMigrationStats` | A few statistics about the lobby operations like the data blob size. This component also contains the last update time of the host migration data which can be used to see when it's time to upload it again.|
21+
| `NonGhostMigrationComponents` | Used to specify which components on entities marked with the IncludeInMigration component will be migrated. |
22+
| `IncludeInMigration` | Used to tag entities containing non-ghost components for migration. Only components specified in the NonGhostMigrationComponents buffer will be migrated. |
2123

2224
The `HostMigrationConfig` component has the following options:
2325

0 commit comments

Comments
 (0)