void JoinRoomRPC(string joinCode) { // If we don't explicitly leave, there's a chance the room will still think // we're in when we try to reconnect..thus saying "you're already in here!!" PhotonNetwork.LeaveRoom(); // Trigger main scene reload. This will end up reconnecting to the region server, which is a bit wasteful, but OK. scenes.LoadMainSceneAsync(new GameBuilderApplication.GameOptions { playOptions = new GameBuilderApplication.PlayOptions { isMultiplayer = true }, joinCode = joinCode }); }
void ShowRoomDetails(GameThumbnail newThumbnail, string roomCode) { string detailCopy = $"<b>{newThumbnail.GetName()}</b> - {newThumbnail.GetPlayerCount()} player(s)"; SelectThumbnail(newThumbnail, (rect) => { gameDetail.FitTo(rect); gameDetail.OpenSpecial(detailCopy, newThumbnail.GetTexture(), playOpts => { // TODO loading screen here? scenes.LoadMainSceneAsync(new GameBuilderApplication.GameOptions { playOptions = new GameBuilderApplication.PlayOptions { isMultiplayer = true }, joinCode = roomCode }); }, true); }); }