Hi there,
I am following aling with the MarcoPolo tutorial. I have set it up to the point where I am automatically joined to the Lobby. This works, but nothing past.
Please see code, why am I not able to create and join a room?
using UnityEngine;
using System.Collections;
using Photon;
public class RandomMatchmaker : Photon.PunBehaviour {
// Use this for initialization
void Start () {
PhotonNetwork.ConnectUsingSettings("0.1");
PhotonNetwork.logLevel = PhotonLogLevel.Full;
}
void OnGUI(){
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
}
public void OnJoinLobby(){
Debug.Log("**OnJoinedLobby()");
PhotonNetwork.JoinRandomRoom();
}
public void OnPhotonRandomJoinFailed(){
Debug.Log("**Cant join room!");
PhotonNetwork.CreateRoom(null);
}
public void OnJoinedRoom(){
GameObject monster = PhotonNetwork.Instantiate("monsterprefab", Vector3.zero, Quaternion.identity, 0);
}
}
I am following aling with the MarcoPolo tutorial. I have set it up to the point where I am automatically joined to the Lobby. This works, but nothing past.
Please see code, why am I not able to create and join a room?
using UnityEngine;
using System.Collections;
using Photon;
public class RandomMatchmaker : Photon.PunBehaviour {
// Use this for initialization
void Start () {
PhotonNetwork.ConnectUsingSettings("0.1");
PhotonNetwork.logLevel = PhotonLogLevel.Full;
}
void OnGUI(){
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
}
public void OnJoinLobby(){
Debug.Log("**OnJoinedLobby()");
PhotonNetwork.JoinRandomRoom();
}
public void OnPhotonRandomJoinFailed(){
Debug.Log("**Cant join room!");
PhotonNetwork.CreateRoom(null);
}
public void OnJoinedRoom(){
GameObject monster = PhotonNetwork.Instantiate("monsterprefab", Vector3.zero, Quaternion.identity, 0);
}
}