Recreation Improvement Stack Change is a query and reply web site for skilled and impartial sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The very best solutions are voted up and rise to the highest
Requested
Seen
11 occasions
I’m utilizing PUN2 for my sport and I’m utilizing the OnRoomListUpdate() operate to sync my UI with the rooms which might be out there to gamers when they’re within the foyer. The room lists come again from Photon simply nice till I swap areas. If I swap areas and rejoin the foyer, I get the OnRoomListUpdate() occasion however no rooms are handed again for that area once I know I’ve rooms open. Beneath is the code I’ve for switching areas:
public void ConnectToRegion(string area)
{
PhotonNetwork.Disconnect();
PhotonNetwork.PhotonServerSettings.AppSettings.FixedRegion = area;
if (!PhotonNetwork.ConnectUsingSettings())
{
Debug.LogError("Unable to attach.");
}
else
{
PhotonNetwork.JoinLobby();
currentRegionText.textual content = $"Present area: {area}";
}
}
$endgroup$
lang-cs