I was following this tutorial How To Make A Driving & Racing Game For FREE - Unity Tutorial #06 - UI & SCRIPTING - YouTube thinking it would all be in C# but suddenly he decided to use JavaScript. The script I need in a C# form is:
var CarControl : GameObject;
function Start () {
CarControl.GetComponent("CarController").enabled = true;
}
Back in the days Unity supported its own kind of Javascript, so thats why at the time of the video it was likely a working example. As the solution to your problem is literally mentioned in the first comment under the video you posted, i think me copying it is not required.
When there is a problem in a tutorial, especially older ones, you are likely never the first one to encounter it. So take a look at the comments first, it may save you a lot of time.
1 Like
Thanks. I do normally look at the comments but I just forgot this time.
1 Like