Photon 2 and Unity error CS0103: The name `PhotonNetwork' does not exist in the current context

So trying out photon 2 and its a;ready broken from normal Photon XD
anyone know a fix?


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

using Photon;
public class SpawnPlayer : MonoBehaviour {

public GameObject ShipSelect;
public Transform PlayerSpawn;
public Transform PlayerSpawn2;
public GameObject CameraUi;
public ShipSelect ShipSelectCS;
public GameObject ShipSelectCObj;



void Start (){


if (ShipSelectCS == null) {
Debug.Log ("NoShipSelectScript");
ShipSelectCObj = GameObject.FindGameObjectWithTag ("ShipSelect");
ShipSelectCS = ShipSelectCObj.GetComponent();
}



GameObject clone = PhotonNetwork.Instantiate (ShipSelectCS.ShipSelectedString, PlayerSpawn.position, PlayerSpawn.rotation, 0);
CameraUi.SetActive (false);




}



public void SpawnPlayerSP(){
GameObject clone = PhotonNetwork.Instantiate (ShipSelectCS.ShipSelectedString, PlayerSpawn.position, PlayerSpawn.rotation, 0);
CameraUi.SetActive (false);
}



}

Comments

Sign In or Register to comment.