I made a script:
using UnityEngine;
using System.Collections;
public class ActiveSetter : Photon.MonoBehaviour {
public GameObject PlayerCamera;
public UnityStandardAssets.Characters.FirstPerson.FirstPersonController script;
public CharacterController CharController;
public HealthManagerCS HealthManager;
public BuilderScriptCS BuilderScript;
// Use this for initialization
void Start () {
if(!photonView.isMine){
Debug.Log ("photonView.isMine is false!");
PlayerCamera.SetActive(false);
script.enabled = false;
CharController.enabled = false;
HealthManager.enabled = false;
BuilderScript.enabled = false;
}
else{
PlayerCamera.SetActive(true);
script.enabled = true;
CharController.enabled = true;
HealthManager.enabled = true;
BuilderScript.enabled = true;
}
}
// Update is called once per frame
void Update () {
}
}
However, after “Photon.”, “MonoBehaviour” is in red, and when I mouse over it, it says “Unknown resolve error.” Also, photonView.isMine is in red and says “The name ‘photonView.isMine’ does not exist in the current context.” Also, most of the “enabled” words are in red and when I mouse over them, I get a “?”. Does any of this have to do with the way I arranged my folders? When I say that, I mean do I need to move any photon folders to anywhere in particular? I have already moved the “Plugins” folder from Photon and dragged it to the root of my Assets folder. What am I doing wrong here? (I get the same “Unknown resolve error.” in all the other scripts that use “Photon.MonoBehaviour”.)