Couple Errors when Connecting to room.
I am getting this error when trying to connect to a room. Here is the console.
I am new so don't know what I did wrong. Thought it was pretty straight forward. Here is my code.
[code2=csharp]using UnityEngine;
using System.Collections;
public class Button : MonoBehaviour {
// Use this for initialization
void Start ()
{
PhotonNetwork.ConnectUsingSettings("v1.0");
PhotonNetwork.CreateRoom("testRoom");
}
// Update is called once per frame
void Update ()
{
if(Input.GetMouseButtonDown(0))
{
PhotonNetwork.JoinRoom("testRoom");
PhotonNetwork.isMessageQueueRunning = false;
Application.LoadLevel("TestMap");
}
}
}[/code2]
I am new so don't know what I did wrong. Thought it was pretty straight forward. Here is my code.
[code2=csharp]using UnityEngine;
using System.Collections;
public class Button : MonoBehaviour {
// Use this for initialization
void Start ()
{
PhotonNetwork.ConnectUsingSettings("v1.0");
PhotonNetwork.CreateRoom("testRoom");
}
// Update is called once per frame
void Update ()
{
if(Input.GetMouseButtonDown(0))
{
PhotonNetwork.JoinRoom("testRoom");
PhotonNetwork.isMessageQueueRunning = false;
Application.LoadLevel("TestMap");
}
}
}[/code2]
0
Comments
-
You can't connect and create room in same time.
First , you need to connect by using your : PhotonNetwork.ConnectUsingSettings("v1.0");
When connected you will receive one callback :
void OnConnectedToPhoton()
{
Debug.LogWarning("OnConnectedToPhoton");
}
and here you can setup PhotonNetwork.playerName, create your room by using PhotonNetwork.CreateRoom("testRoom"); and when your room will be created you will receive one new call back:
private void OnCreatedRoom()
{
Debug.Log("OnCreatedRoom");
}
At this step , you can disable the isMessageQueueRunning , loading your game scene for exemple and enable the isMessageQueueRunning.0