Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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:
    11
    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

    Joined:
    Sep 30, 2020
    Posts:
    306
    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.