# Netcode for Entities 1.9.1 released

**URL:** https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861
**Category:** Netcode for Entities
**Tags:** Netcode-for-Entities, Releases, Official
**Created:** [October 17, 2025, 2:31pm UTC](https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861 "2025-10-17T14:31:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mathieu\_mm\_unity](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/mathieu_mm_unity/32/976316_2.png) [@mathieu\_mm\_unity](https://discussions.unity.com/u/mathieu_mm_unity)
#### Post date: [October 17, 2025, 2:31pm UTC](https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861/1 "2025-10-17T14:31:15Z")

</div>

📦 [Netcode for Entities 1.9.1](https://docs.unity3d.com/Packages/com.unity.netcode@1.9/changelog/CHANGELOG.html) **is now live!** 📦

## Key Updates in This Release

This patch improves the host migration system data gathering speed, it also brings some fixes to code generated fields and more.

> **Changed**
>
> - Host migration system now caches the ghost component types it uses when collecting host migration ghost data, resulting in faster host migration data collections. It’s updated any time the ghost prefab count changes.
> - `GhostField.Quantization` template mismatch errors are now warnings, and will resolve to working code, rather than outputting errors. As a result, we will no longer assume primitive integer types want to disable quantization, as that logic did not cover all cases (e.g. like `Entity` structs etc).
> - Host migration internal ghost data gathering has improved and should be faster now but add a few bytes of extra data compared to before.

> **Fixed**
>
> - Occasional `MultiplayerPlayModeWindow.HandleHyperLinkArgs` truncation error spam.
> - Unsafe compiler error when using a `fixed` array as a `GhostField`. [Note: You must implement a corresponding safe accessor method implementing ref returns](https://docs.unity3d.com/Packages/com.unity.netcode@latest?subfolder=/manual/ghost-types-templates.html#supporting-unsafe-fixed-tconst).
> - `GhostField` compiler error when using `FixedList` with nested `struct` types, as well as related `InvalidOperationException` in a `SubString` call when using a `FixedList` with a primitive type.
> - Code generator incorrectness when generating struct fields for `GhostField` `FixedList` and `fixed` array serializers (`Entity` fields in particular).
> - Incorrect `curChangeMaskBits` offset after a `FixedList` field is generated, due to incorrect `aggregateChangeMask` flag. It’s now forced correct via `forceComposite`.
> - `FixedList`’s and `unsafe fixed array`) now correctly support non-public structs for the element type (in cases where we know the code-gen will resolve without compiler errors).
> - `GhostSnapshotValueEntity` now uses `TryGetValue` rather than a `HasComponent` call followed by a lookup, reducing lookup costs.
> - Issue where specifying a `LogLevel` (via the `Default.globalconfig`’s `unity.netcode.sourcegenerator.logging_level` property) did nothing.

---

<div class="post-metadata">

### Author: ![CyborgRaven](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/cyborgraven/32/978652_2.png) [@CyborgRaven](https://discussions.unity.com/u/CyborgRaven)
#### Post date: [October 30, 2025, 8:34am UTC](https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861/2 "2025-10-30T08:34:13Z")

</div>

> [@mathieu\_mm\_unity](#):
>
> `GhostSnapshotValueEntity` now uses `TryGetValue` rather than a `HasComponent` call followed by a lookup, reducing lookup costs.

This is causing a problem.  
A simple RPC command like this results in a compile error.

```auto
public struct BugComponent : IRpcCommand
{
    public Entity E1;
    public Entity E2;
}

```

The generated code under “Temp\NetCodeGenerated\Unity.NetCode” has a snippet like this:

```auto
        public void Serialize(ref DataStreamWriter writer, in RpcSerializerState state, in BugComponent data)
        {
            if (state.GhostFromEntity.TryGetComponent(data.E1, out var ghostComponent))
            {
                writer.WriteInt(ghostComponent.ghostId);
                writer.WriteUInt(ghostComponent.spawnTick.SerializedData);
            }
            else
            {
                writer.WriteInt(0);
                writer.WriteUInt(Unity.NetCode.NetworkTick.Invalid.SerializedData);
            }
            if (state.GhostFromEntity.TryGetComponent(data.E2, out var ghostComponent))
            {
                writer.WriteInt(ghostComponent.ghostId);
                writer.WriteUInt(ghostComponent.spawnTick.SerializedData);
            }
            else
            {
                writer.WriteInt(0);
                writer.WriteUInt(Unity.NetCode.NetworkTick.Invalid.SerializedData);
            }
        }

```

The `out var ghostComponent` in line 3 and line 13 are in the same scope - outside of the if block. Thus, `error CS0128: A local variable or function named 'ghostComponent' is already defined in this scope`.  
This did not happen in 1.9.0 since when using `HasComponent`, the `ghostComponent` was defined inside the if blocks, which have separated scopes.

---

<div class="post-metadata">

### Author: ![SamuelBellomoUnity](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/samuelbellomounity/32/101249_2.png) [@SamuelBellomoUnity](https://discussions.unity.com/u/SamuelBellomoUnity)
#### Post date: [October 30, 2025, 7:42pm UTC](https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861/3 "2025-10-30T19:42:31Z")

</div>

That’s a bug on our end, do you mind bugging this using the `Help/Report a Bug` menu in Unity please? That’ll help us better track it. Thanks a bunch and sorry about this!

---

<div class="post-metadata">

### Author: ![CyborgRaven](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/cyborgraven/32/978652_2.png) [@CyborgRaven](https://discussions.unity.com/u/CyborgRaven)
#### Post date: [October 31, 2025, 4:03am UTC](https://discussions.unity.com/t/netcode-for-entities-1-9-1-released/1690861/4 "2025-10-31T04:03:47Z")

</div>

This was reported two weeks ago ([IN-121079](https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-121079)), but there has been no response. The bug itself is quite straightforward and shouldn’t be difficult to fix, but its impact is severe (Compile Error). That’s why I’m bringing it up again here, hoping to draw attention to it. Please prioritize getting this bug into the evaluation and fix process. Thank you!
