- Home /
Question by
worldofcars · Jul 22, 2012 at 06:01 PM ·
photon
why do I get this error?
Hello. I always get this error: "Unknown identifier "PhotonView"". Why? Here is the thing I used:
photonView.RPC("test1", RPCMode.All);
Comment
The compiler doesn't understand what object the identifier "photonView" is referring to, which means that it's probably not declared in the scope of where you're trying to use it. Post the entire code block, and things might become clearer.
Answer by Doireth · Jul 23, 2012 at 12:28 AM
The variable has not been declared in the relevant scope leaving the compiler unable to find what you are referencing. Make sure you have the variable "PhotonView" declared and all references to the variable using correct capitalization (variables are case-sensitive).