- Home /
Getting an "Unknown Resolve Error" with Photon.MonoBehaviour
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".)
Answer by tobiass · Jul 17, 2015 at 12:32 PM
It's quite likely that you broke something in your project due to moving the files around. Does Unity compile the code, aside from this error? If you comment-out this file and just compile the rest? It could be a follow-up issue from something else. In doubt, re-import.
Your answer
Follow this Question
Related Questions
Photon Networking - What function(s) are called when a player (not me) is spawned? 2 Answers
Photon Instantiate messes up the camera 0 Answers
Sending (and receiving) player names with Photon Networking 0 Answers
Can we use "Photon cloud" for a card game like poker in Unity3d? 1 Answer
Photon Networking (Viking Demo) - GetRoomList() func not working 2 Answers