Hello. I have had a problem, Whenever I press the Test Game button it shows up on my screen "All Compiler errors must be fixed before you can enter play mode". I know it is not just my script because I tried it with the scripts that came Pre Made with unity. If you could help soon, that would be great. Thanks ~Daragh Carroll.
All scripts have to compile before you can play, not just the one you want to have running in a scene. Go into the console and check every error that's in there, and when they're all fixed it should work again
CTRL-SHIFT-C
When the console opens click “clear”
Then paste the rest of the errors here, Ill see if I can fix your problem.
Fix all your compiler errors
" Assets/moveAround.js(17,9): BCE0024: The type ‘UnityEngine.RequireComponent’ does not have a visible constructor that matches the argument list '(String) " this is the message under the console tab. and this is the script itself:
var speed = 3.0;
var rotateSpeed = 3.0;
function Update()
{
var controller : CharacterController = GetComponent(“CharacterController”);
//Rotate around y - axis
transform.Rotate(0, Input.GetAxis (“Horizontal”) * rotateSpeed, 0);
//Move forward / Backward
var forward = transform.TransformDirection (Vector3.forward);
var curSpeed = speed * Input.GetAxis (“Vertical”);
controller.SimpleMove(forward * curSpeed);
}
@script RequireComponent(“CharacterController”)