Single Stick Controller Resets on Game Play
I have added a Joystick from the Standard Assets MobileSingleStickController prefab. I have wired it up to control a player and have fixed the issue where it drops to the lower left off the screen. I want to move this joystick from the default bottom left corner to an alternate position (right corner or middle as per player preference). However, when I position the Controller (with the child Joystick), and press play the Controller resets its Rect Transform to the origianal prefab defaults. I've attempted to duplicate and modify the prefab and was able to 'reset' the prefab to my own defaults, but it changes back anytime the game is played. Is there something that I'm missing in the script that is resetting the size of the controller and it's position? How do I control where the joystick is positioned on the screen? As an afterthought, I did also remove the button from the prefab, if that affects the outcome.
Answer by Oz_the_Obscure · Oct 26, 2015 at 11:51 AM
I think I found the solution. The Mobile Single Stick controller is already on a canvas set to inherit. I moved the actual joystick off the prefab controller on to the existing canvas with the MobileControlRig script and it stopped resetting the position.
Your answer
Follow this Question
Related Questions
Joystick 3rd Axis problem on Linux 0 Answers
nested two joysticks 0 Answers
How to make Canvas appear after GUI texture? Unity 4.7 1 Answer
Bad values for joystick input in unity 5 0 Answers