On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Multiplayer Photon not working! Please help

A topic by GreenViper2020 created Jul 04, 2022 Views: 74
Viewing posts 1 to 1

Im folloing a tutorial for multiplayer. I did everything like him but i cant connect or create rooms. This is thee error i get:

Error: CreateRoom failed. Client is on MasterServer (must be Master Server for matchmaking)but not ready for operations (State:PeerCreated ). Wait for callback: OnJoinedLobby or OnConnectedToMaster.


Code:

using System.Collections;

using System.Collections.Generic;

using UnityEngine;

using UnityEngine.UI;

using Photon.Pun;

using TMPro;

public class CreateAndJoinRooms : MonoBehaviourPunCallbacks

{

    public TMP_InputField createInput;

    public TMP_InputField joinInput;

    public void CreateRoom()

    {

        PhotonNetwork.CreateRoom(createInput.text);

    }

    public void JoinRoom()

    {

        PhotonNetwork.JoinRoom(joinInput.text);

    }

    public override void OnJoinedRoom()

    {

        PhotonNetwork.LoadLevel("GameScene");

    }

}

Please help! Thanks