Client Network Transform syncing unchecked axis

Hi!

I have a GameObject with the following line of code:

transform.position = new Vector3(transform.position.x, transform.position.y, -5f);

The GameObject also has the ClientNetworkTransform component attached to it.9627647--1367531--upload_2024-2-6_20-4-24.png

This is a 2D game so the Z axis is unchecked. When I enter play mode, the Z axis of the GameObject is at 0 even though the script is supposed to force it to be -5.

When I disable the ClientNetworkTransform component in runtime in the editor, then the Z is -5 but for some reason when its enabled, the Z is at 0.

There is no other script that messes with the position of this GameObject. Just these.

I would appreciate any help! Thanks (:

HI @yoavtc2004 ,

Could you provide a bit more context of where that line of code is being invoked (i.e. in Awake, Update, Start, OnNetworkSpawn, etc) and on which component it is being invoked? It would help me determine what might be happening here.