OnJoinedRoom public void does not work
I can't use "OnJoinedRoom", code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Photon.Pun;
public class CreateAndJoinRooms : MonoBehaviour
{
public InputField createInput;
public InputField joinInput;
public void CreateRoom()
{
PhotonNetwork.CreateRoom(createInput.text);
}
public void JoinRoom()
{
PhotonNetwork.JoinRoom(joinInput.text);
}
public override void OnJoinedRoom()
{
PhotonNetwork.LoadLevel("Game");
}
}
When i change that line to "public void OnJoinedRoom()" it says that is correct but it works wrong.
Sorry for bad english i speak spanish.
Answers
-
it already works, it was a mistake on the "public class CreateAndJoinRooms : MonoBehaviour" line, i forgot to put "PunCallbacks" at the end
0