Player won't spawn and Debug.Log doesn't give output.

Hey everybody. I’ve been following quill18’s tutorial on creating a multiplayer FPS. However, for the past few hours I’ve been dealing with an issue in the NetworkManager script. The player doesn’t spawn, and no debug logs are given. After checking if the methods are called, I found that they weren’t. I’m using Unity 5.0.0f4, so it’s a different version than he used, but I can’t find any material on how to solve the problem. I’ve tried rewriting the script and restarting Unity. Any help that you can provide will be much appreciated. Thanks for reading!

using UnityEngine;
using System.Collections;

public class NtwrkMgr : MonoBehaviour {

    public bool offline = false;
    public bool ojl = false; //test variable - returns true if OnJoinedLobby() was called.

    void Start (){
        // Connect to server.
        Connect();
    }

    void Connect(){
        // Connect using version settings.
        PhotonNetwork.ConnectUsingSettings("v0.0.1");

        // Determine if OnJoinedLobby() was called.
        if(!ojl)
        {
            Debug.Log ("OnJoinedLobby failed.");
        }
    }

    void OnGUI(){
        // Shows connection state in-game.
        GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());
    }

    void OnJoinedLobby(){
        // Set ojl to true.
        ojl = true;
        Debug.Log("Joined lobby");

        // Join random room.
        PhotonNetwork.JoinRandomRoom();
    }

    void OnPhotonRandomJoinFailed(){
        Debug.Log("Failed to join lobby");

        // Create new lobby if none exist.
        PhotonNetwork.CreateRoom(null);
    }

    void OnJoinedRoom(){
        Debug.Log("Joined room.");

        //Spawn player.
        SpawnMyPlayer();
    }

    void SpawnMyPlayer(){
        Debug.Log ("Spawned player.");

        // Instantiate player object.
        PhotonNetwork.Instantiate("PlayerController", Vector3.zero, Quaternion.identity, 0);
    }
}

Doesn’t photon have it’s own version of MonoBehaviour you should inherit from?

You can also use the built in solution with UNet.

I’m not sure but I’ll go see what I can find. Thanks for the reply!