var CarControl : GameObject;
function Start () {
CarControl.GetComponent(“CarController”).enabled = true;
}
this is a javascript code how do i convert it into c# code
var CarControl : GameObject;
function Start () {
CarControl.GetComponent(“CarController”).enabled = true;
}
this is a javascript code how do i convert it into c# code
can u provide me the code i am not able to do it since i am new in unity
it would be better to try something first, to learn, then next time you can fix anything yourself fast!
also checking documentation always helps, if you need to know GetComponent (there is example in c# too)
You won’t learn anything if we just hand you the code. If that tutorial is too complex it means you’re not ready to do whatever it is you’re trying to do and you need to choose a simpler tutorial. Like Roll-a-Ball.
https://learn.unity.com/project/roll-a-ball-tutorial
If you run into any tutorials that use JavaScript you need to just close them and move on. Tutorials using that language are insanely old and may teach you things that are no longer valid with Unity.
That is not how the forums work. The kind folks here are not going to do the work for you because you are “new”. If you are new, you need to be learning. There have been 3 solid responses as to where to look. Use them. Additionally, if you intend to continue your journey in game development and learning unity, you need to read what is provided. There is a whole section dedicated to learning, and the forums have clearly stated rules. One of which is that this is the wrong place for support.
Closing.