Search Unity

How to check/change authority of a NetworkObject

Discussion in 'Netcode for GameObjects' started by toan-stt, Nov 15, 2021.

  1. toan-stt

    toan-stt

    Joined:
    Sep 30, 2013
    Posts:
    3
    Hi all,
    I follow the hello world project and I have a NetworkObject that is automatically spawned from the server with IsLocalPlayer=true and IsOwnedByServer=false.

    However, after I attached the NetworkTranfrom component I cannot change the transform in the client. It is clear that the client is following the transform in the server. But I want the opposite

    I believe changing the authority can help but I can't that attribute anywhere.
     
  2. luke-unity

    luke-unity

    Unity Technologies

    Joined:
    Sep 30, 2020
    Posts:
    223
    If you want a client to move a NetworkObject you need the ClientNetworkTransform component. This component can be installed as a separate package sample. For more information check the ClientNetworkTransform section here.
     
unityunity