Photon joining Problems

Ive been following welton kings videos to make a multiplayer fps game and he has a group of 3 videos where he sets up photon multiplayer. I followed the videos and got everything to work, when I clicked play, I joined a server and could see the other player but suddenly for some reason, now when I test my game, I cant see the other players. I know I am properly joining the game but I cant figure out where I went wrong

Comments

  • NavNav
    public class Launcher : MonoBehaviourPunCallbacks
    {

    public void Awake()
    {
    PhotonNetwork.AutomaticallySyncScene = true;
    Connect();
    }

    public override void OnConnectedToMaster()
    {
    Debug.Log("CONNECTED");


    base.OnConnectedToMaster();
    }

    public override void OnJoinedRoom()
    {
    StartGame();

    base.OnJoinedRoom();
    }

    public override void OnJoinRandomFailed(short returnCode, string message)
    {
    Create();

    base.OnJoinRandomFailed(returnCode, message);
    }
    public void Connect()
    {
    Debug.Log("Trying to connect...");
    PhotonNetwork.GameVersion = "0.0.0";
    PhotonNetwork.ConnectUsingSettings();
    }

    public void Join()
    {
    PhotonNetwork.JoinRandomRoom();
    }

    public void Create()
    {
    PhotonNetwork.CreateRoom("");
    }
    public void StartGame()
    {
    if (PhotonNetwork.CurrentRoom.PlayerCount == 1)
    {
    PhotonNetwork.LoadLevel(1);
    }

    }
    }
Sign In or Register to comment.