Netcode for Gameobject broke with Unity 6 Update new network Transform does not work [CASE IN-90743]

I updated my project to Unity 6 and Netcode for Gameobjects to 2.1.1 and it broke the Network Transform. I replaced the Old Client Network Transform with the Updated original one Setting the Authority from Server to Owner and I am receiving the following error on Host when Client joins the game:

NullReferenceException: Object reference not set to an instance of an object
Unity.Netcode.NetworkTransformMessage.Deserialize (Unity.Netcode.FastBufferReader reader, Unity.Netcode.NetworkContext& context, System.Int32 receivedMessageVersion) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Messaging/Messages/NetworkTransformMessage.cs:76)
Unity.Netcode.NetworkMessageManager.ReceiveMessage[T] (Unity.Netcode.FastBufferReader reader, Unity.Netcode.NetworkContext& context, Unity.Netcode.NetworkMessageManager manager) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkMessageManager.cs:578)
Unity.Netcode.NetworkMessageManager.HandleMessage (Unity.Netcode.NetworkMessageHeader& header, Unity.Netcode.FastBufferReader reader, System.UInt64 senderId, System.Single timestamp, System.Int32 serializedHeaderSize) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkMessageManager.cs:444)
UnityEngine.Debug:LogException(Exception)
Unity.Netcode.NetworkMessageManager:HandleMessage(NetworkMessageHeader&, FastBufferReader, UInt64, Single, Int32) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkMessageManager.cs:448)
Unity.Netcode.NetworkMessageManager:ProcessIncomingMessageQueue() (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Messaging/NetworkMessageManager.cs:470)
Unity.Netcode.NetworkManager:NetworkUpdate(NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs:288)
Unity.Netcode.NetworkUpdateLoop:RunNetworkUpdateStage(NetworkUpdateStage) (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkUpdateLoop.cs:191)
Unity.Netcode.<>c:<CreateLoopSystem>b__0_0() (at ./Library/PackageCache/com.unity.netcode.gameobjects/Runtime/Core/NetworkUpdateLoop.cs:214)

The Documentation seems to be out of date and still mentions the custom client Network Transform script. (which does not work anymore)

Hi, Ruuds. Could you send me the link to the outdated documentation?

I believe Ruuds is referencing this documentation here: NetworkTransform | Unity Multiplayer

1 Like

Hi Ruuds,

That particular exception means that the NetworkObject receiving that message has a valid list of NetworkTransform components (otherwise it would have given an index out of range error) but it would seem the NetworkTransform component doesn’t exist.

Is there any way you can provide a replication project for this? If not could you file a bug in the editor and post the bug ticket number here so we can expedite getting it migrated over to our netcode team to look into this issue?

Hi Ruuds,

Just to make sure I created a simple project in 2022.3 that uses NGO v1.11.0 (wasn’t sure which version of NGO you were upgrading to) and then opened that project in Unity 6 and upgraded NGO to v2.1.1. The project uses a direct copy of the ClientNetworkTransform and I was not able to replicate the issue.
I am attaching this project to provide you with an option to make modifications to it to better match your project and if you can replicate the issue with your modifications please post the updated version (prior to upgrading) here.
UpgradeNGOv1Tov2.zip (25.1 KB)

If this is not possible, then if you could submit and issue via the editor using your project prior to upgrading that will help us figure out what is the cause for the exception your are experiencing.

Hi,
I am looking at this page: NetworkTransform | Unity Multiplayer

The Network Transform from netcode 2.1.1 in my Editor looks like this:

1 Like

Hi,

Thank you for helping, I was not able to replicate the Issue with your project.

I did make a bug report and upload my project with the error
CASE IN-90743