The name 'PhotonNetwork' does not exist....

Options
lwik
lwik
Hi All, first post here.. Today I started to follow this tutorial on youtube, https://www.youtube.com/watch?v=evrth262vfs

My code is such so far.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class photonConnectScript : MonoBehaviour {

public string versionName = "1.0";

public void connectToPhoton(){
	PhotonNetwork.ConnectUsingSettings(versionName);
}

}
But I am getting an error trying to use the PhotonNetwork. The error message "The name 'PhotonNetwork' does not exist in the current context". I would assume is missing a namespace, but I cana't seem to find the answer?

Any help in the right direction is appreciated.

Thanks!

-Lars

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited June 2018
    Options
    Hi @lwik Lars,

    Thank you for choosing Photon!

    Did you download and properly import PUN from the Asset Store to your project?
  • lwik
    Options
    Hi JohnTube, thanks for responding.

    Later last night I found the problem after reading lots of docs, I hope. I ended up dragging the PhotoNetwork folder and UnityScripts folder (I think it was, I am at work so I can't check at the moment) from their folder to the plugin folder in Unity project list it seemed to sort that issue out. That is as far as I have gotten. I hope that tutorial is still current I was following?

    Thanks!