public override void OnStartLocalPlayer() { base.OnStartLocalPlayer(); //so whenever we access TestNetworkPlayer.local, //it will ALWAYS be looking for the LOCAL player on the client we use local = this; }
public void Setup() { playerController = playerObj.GetComponent<TestPlayerController>(); n_Player = playerObj.GetComponent<TestNetworkPlayer>(); n_Player.playerName = playerName; }