Hello,
I want to develop an Android game with Unity using a joystick control that shows up whenever the player touches the screen. To develop a ready prefab, I’m trying to modify the MobileSingleStickControl from Unity 5’s Ready Assets (CrossPlatformInput), but I just can’t figure out how to do it. I know how the logic should work (get the first touch position and assign it as the original joystick position), but since I’m new to Unity and C# in general I don’t know where I can try to write it down.
I have already tried writing it on Start() or OnPointerDown() methods from Joystick.js, and also tried to create a new script related to the canvas that would execute the Joystick.js script, but none of them worked because they aren’t the right place. I did not found out where the scripts get the touch position to make the joystick move nor where and how the methods from Joystick.js are executed, and that’s really confusing me…
Could someone please help me to understand how this ready asset works?