Search code examples
c#unity-game-engineunity3d-unet

Child Objects of LocalPlayer is not localplayer?


enter image description here

In the screenshot the PlayerPrefab is the gameobject that is spawned when a player connects the server. So the root gameobject i.e PlayerPrefab has the localplayer authority. Where in the child objects the localplayerauthority is checked and still they show "isLocalPlayer" as false in the console.

So the child gameobjects are not considered as localplayer. How to solve this issue? Pls Help!


Solution

  • I think you are confused on what Authority is and what isLocalPlayer is. Local Player Authority means that the player is able to control that object and make changes to it over the server. isLocalPlayer is just a check that is done to see if the entity performing the operation is the player or not (i.e. server).