Access Joystick script

I have GameObject “Player” with attached scripts “Player” and “Joystick” (last - from the Standard mobile assets):


When I try to access Joystick from my code:

Joystick joystick = GetComponent<Joystick> ();

it says, that:

Assets/Scripts/Player.cs(10,17): error CS0246: The type or namespace name `Joystick' could not be found. Are you missing a using directive or an assembly reference?

How can I access it?

It looks like you are using a C# class to access a Javascript class which doesn’t appear to be possible. (Unity 3.5)

Instead, you may be interested in the Joystick.cs available in the wiki: