OnCreatedRoom() is firing multiple time
Options
Hello,
I am creating a room as such:
public void OnClick_CreatePublicRoom()
{
RoomOptions roomOptions = new RoomOptions() { IsVisible = true, IsOpen = true, MaxPlayers = 6 };
if (PhotonNetwork.CreateRoom(RoomName.text, roomOptions, TypedLobby.Default))
{
print("Create room succesfully sent");
}
else
{
print("Create Room failed to send");
}
}
I can verify from the Console that this is executed only once (upon button click)
However I also have:
private void OnCreatedRoom()
{
print("Room created successfully.");
}
According to the Console, this is being fired off 3 times.
Any ideas why OnCreatedRoom() would execute multiple times for a single PhotonNetwork.CreateRoom?
I am creating a room as such:
public void OnClick_CreatePublicRoom()
{
RoomOptions roomOptions = new RoomOptions() { IsVisible = true, IsOpen = true, MaxPlayers = 6 };
if (PhotonNetwork.CreateRoom(RoomName.text, roomOptions, TypedLobby.Default))
{
print("Create room succesfully sent");
}
else
{
print("Create Room failed to send");
}
}
I can verify from the Console that this is executed only once (upon button click)
However I also have:
private void OnCreatedRoom()
{
print("Room created successfully.");
}
According to the Console, this is being fired off 3 times.
Any ideas why OnCreatedRoom() would execute multiple times for a single PhotonNetwork.CreateRoom?
0
Comments
-
Same script attached to 3 different objects. Problem found.0