Hello
I am fairly new to Unity. Im working with the OnGUI controls but have been running into problems. Heres my code
function OnGUI()
GUI.Button (Rect (560,25,140,35), CameraView)
;
{
if(CameraView < 7)
(CameraView++);
else
var CameraView = 1;
}
(GUI.Label (Rect (20,40,140,35), "Speed: " + Speed + " MPH")
// Displays "Speed: -- MPH.".
);
I have already made the variable before in the class and this is just the OnGUI side of the code
For some reason it comes up with the error “BCE0043: Unexpected token: GUI.”
Im sure that its just something simple but ive looked around the internet and unity answers but havent been able to find exactly the solution
Any help will be appreciated
Thank You
P.S. CameraView and Speed are variables. Also this is written in Javascript