- Home /
Camera Swap Script
I am getting a compile error...have I missed something. Much appreciated. I'm obviously not a coder. Assets/camera_script_nw.js(4,11): BCE0044: expecting (, found 'Start'.
var main_Camera : Camera;
var Camera_2 : Camera;
-function Start(){ main_Camera.enabled = true; Camera_2.enabled = false;
}
-function Update (){ if(Input.GetKeyUp("1")){ main_Camera.enabled = true; Camera_2.enabled = false;
}
if(Input.GetKeyUp("2")){ main_Camera.enabled = false; Camera_2.enabled = true;
}
}
Answer by Eric5h5 · Jul 02, 2011 at 11:45 PM
Your Start function is missing a bracket. Always properly format code, that way you can catch errors like this easily.
Your answer
Follow this Question
Related Questions
Compiler error - how to fix it? 0 Answers
Unhandled Exception: Mono.CSharp.InternalErrorException: Internal error 1 Answer
Generate and Run Coroutine at runtime 1 Answer
How to use CSharpCodeProvider in windows standalone? 1 Answer
Failed to recompile resources Facebook sdk integration with admob, unity ads plugin 1 Answer