/// <summary> /// Joins any available room but will fail if none is currently available. /// </summary> /// <remarks> /// If this fails, you can still create a room (and make this available for the next who uses JoinRandomRoom. /// </remarks> public static void JoinRandomRoom() { if (room != null) { Debug.LogError("JoinRandomRoom aborted: You are already in a room!"); } else { if (offlineMode) { offlineMode_inRoom = true; NetworkingPeer.SendMonoMessage(PhotonNetworkingMessage.OnJoinedRoom); } else { networkingPeer.OpJoinRandom(null); } } }