- Home /
Script Reference using C #
I am facing problem in referencing Joystick.js script in CarInput.cs
public Joystick joystick;
void Start() { joystick= GetComponent();
}
CarInput.cs is attached to CarInput gameobject and Joystick is attached to SingleJoystick GUITexture .. I tried to attach it to CarInput.cs also even though it is giving error of no reference of joystick..
Comment
Best Answer
Answer by Eric5h5 · Oct 20, 2011 at 06:21 PM
Read the docs about script compilation order, specifically section 3: http://unity3d.com/support/documentation/ScriptReference/index.Script_compilation_28Advanced29.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613014933im_/https://answers.unity.com/themes/thub/images/avi.jpg)