[Offline mode] Your event is not being sent! Check if you are in a room.
berana
✭
When I join a room in offline mode, my player prefab does not get generated. Throws a warning as seen in the title. Here's what's happening in my code:
PhotonNetwork.Disconnect();
yield return new WaitForSeconds(0.5f);
PhotonNetwork.OfflineMode = true;
PhotonNetwork.CreateRoom("Local Room");
//scene loads
//this line doesn't spawn the player. throws warning.
GameObject player = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "PlayerController"),
spawnPoint1.position, Quaternion.identity);
I've verified that I am in fact in the room at time of instantiation.
PhotonNetwork.Disconnect();
yield return new WaitForSeconds(0.5f);
PhotonNetwork.OfflineMode = true;
PhotonNetwork.CreateRoom("Local Room");
//scene loads
//this line doesn't spawn the player. throws warning.
GameObject player = PhotonNetwork.Instantiate(Path.Combine("PhotonPrefabs", "PlayerController"),
spawnPoint1.position, Quaternion.identity);
I've verified that I am in fact in the room at time of instantiation.
0
Comments
-
Issue resolved - other code was being run that tried to instantiate a network object through unity's instantiate method rather than photon's.0