- Home /
How to get reference of the Local Game Player when a Game Scene is Loaded from a Lobby Scene [Multiplayer]
How to get reference of the Local Game Player when a Game Scene is Loaded from a Lobby Scene? I tried accessing the NetworkLobbyManager.singleton.client.conection.playerControllers[0].gameObject. It works when playing as host but when I'm a client. It doesn't.
If you attach any script that is inherit from network behaviour to Game player than you can get local player using isLocalPlayer from any network behaviour.
This is same for host and client.
Any one from the all your gameplayer's isLocalPlayer property is true, and that is your local player.
I tried checking if it is the local player it returns true but Im getting the local network lobby player not the local player
Answer by unity_6BA4690097128901B002 · Jun 06, 2021 at 08:16 PM
Im sorry mau i question pliss..i have play n game Made by unity as specially Made by charlottemqd...chas make money..but when i soon WD here say i too long not login to him game ..anyone can explain n answer me..thanks