- Home /
Photon Network, how to spawn FPSController from Unity Standard Assets?
I know how to instantiate it and others.. But when im building game and enter server i can move 2nd player and 2nd player can move me :/
Please help me
Answer by ChristianSimon · Sep 12, 2017 at 08:11 AM
Hi,
please add a if (!PhotonView.isMine) return;
condition to each Update, FixedUpdate and LateUpdate function (if used) of each script, which is attached to the instantiated game object having a PhotonView component. This way you avoid the described scenario.
Answer by UnLuckyCharmss · Sep 24, 2017 at 02:59 PM
You might want to try something like this but with correct script references. NOTE: Make sure the move controller is disabled on the prefab and it is in the 'Resources' folder.
GameObject Player = PhotonNetwork.Instantiate ("FPSController", this.transform.position, this.transform.rotation, 0); player.GetComponent().enabled = true;
Hope This Helped :D