I can't connect to the server.

Options
Whenever I run the game, it doesn't connect. Here's my code:

using UnityEngine; using System.Collections; public class NetManager : MonoBehaviour { public Transform spawnPoint; void Start () { PhotonNetwork.ConnectUsingSettings("0.1"); print("Connecting: " + PhotonNetwork.connecting); print("Connected: " + PhotonNetwork.connected); } void OnJoinedLobby() { RoomOptions roomOptions = new RoomOptions() { isVisible = false, maxPlayers = 4 }; PhotonNetwork.JoinOrCreateRoom("RBG", roomOptions, TypedLobby.Default); print("Lobby Joined"); } void OnJoinedRoom() { PhotonNetwork.Instantiate("Player", spawnPoint.position, spawnPoint.rotation, 0); print("Room Joined"); } }

The above print lines print "Connecting: true" and "Connected: false" to the console..
The game never calls OnJoinedLobby or OnJoinedRoom, I don't get the prints in the console

I have the Photon View Script on my game object.
This script is attached to an empty game object.
I have my appID in the PhotonServerSettings

I appreciate the help. And I'm sorry if this has been posted before, or if it's something stupid. I couldn't find an answer.

Comments

  • vadim
    Options
    What is in Unity log?
    Do PUN demos work for you with your app id?
  • Yes, the Demos work just fine. I think I actually just fixed it. It messed up the import. I deleted the files from my project and reimported them. It seems to be working fine now..