Hello and good day to all !
I am following a unity tutorial for iOS (http://www.raywenderlich.com/25349/how-to-get-started-with-unity-part-23), and I reach at the part where I need to implement the joystick and need to assign the joysticks to actually move and rotate the player.
I insert these two lines and it throws the aforementioned error, which I suggestively enter in title :)
var moveJoystick : Joystick;
var rotateJoystick : Joystick;
Can anyone please help ?
Thanks in advance, Dan.
I don't know what tutorial you're following, but Unity doesn't have a Joystick class (and since it doesn't exist, it's not a valid type).
Answer by raycosantana
Mar 04, 2014 at 01:00 PM
The simplest solution is to put the Joystick class inside the "Assets/plugins" folder (If you don't have one create it), now you can call Joystick class from any script.
Answer by Izitmee
Feb 20, 2014 at 09:51 AM
In that tutorial, Joystick is an external class you need to import (see the beginning of the chapter "Double the Joysticks, Double the Fun"). Once you do that, you won't get that error anymore :)
Almost. Just had to eventually drag the script within the Joystick.js script "folder"
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
22 People are following this question.
Joystick isn't responding?
Best use of GetButton
Need Help with this movement Script
Script working for standard FPS controller not mobile FPS controller
problems with virtual joystick for IOS