- Home /
Question by
bman1298 · Aug 25, 2015 at 11:03 AM ·
camerascripting problembug
I keep getting the "A namespace does not directly contain members such as fields or methods" error. Can someone please tell me how to fix this error?
var Cam1 : Camera;
var Cam2 : Camera;
function Start () {
Cam1.enabled = true;
camera3rd.enabled = false;
}
function Update () {
if (Input.GetKeyDown ("c")){
if ( Cam1.enabled == true){
Cam2.enabled = true;
Cam1.enabled = false;
}
else if (Cam2.enabled == true){
Cam1.enabled = true;
Cam2.enabled = false;
}
}
}
Comment
There is no error with this script. R you calling this script variable or method from any other script ?