I use Unity and Photon for the multiplayer. I Instantiate my gameObjects using this method :
void LoadGameObject(PhotonPlayer player,bool isMaster)
{
if (isMaster)
{
GameObject baby = PhotonNetwork.InstantiateSceneObject(babies[0].name,
babies[0].transform.position, Quaternion.identity, 0,null);
baby.SetActive(true);
Debug.Log("playerpref created on " + player.ID);
}
else
{
//Nothing for the moment
}
}
I call the method in "OnJoinedRoom()" and "OnPhotonPlayerConnected(PhotonPlayer other)", but when the second player join the room, he can't see the gameObjects because they aren't activated on his scene.
Any Idea of the mistake ?