0
\$\begingroup\$

I've come across something unusual with my HTC One M8, I'm not sure if it's phone specific, a bug in unity, or just poor setup on my part.

I've been using Unity Remote 4 to test in realtime, and it's really quite awesome. Don't think I've ever seen something quite so efficient for testing short of .NET and Windows Phone (and even then it's bloody close!)

Anywho, when in Unity Remote, obviously it's not an APK that's running but something that's running in some sort of virtual machine style environment, whereby the code is executed directly with massive links via USB. I tried, yesterday, to install my application as an apk, and for some reason the on screen controls didn't work. The boxes for them didn't appear (there is a dashed line around each control "area", and tapping and swiping simply did nothing.

I'm curious if this is because I've set the controls up as a "debug only" option, so I tried a debug build and still nothing. I tried a few other things like checking all the settings I could find to ensure nothing suggested that they were debug only, with no luck. Not sure where to turn.

If it helps at all, I'm using the "sample pack" (from the default assets) for mobile development, with a sprite as my "player", configured as a 2d sprite in a 2d side scroller game. I'm about to try it with the absolute default settings, literally just as a test, but I'm pretty confident that it won't make a blind difference.

\$\endgroup\$
1
\$\begingroup\$

Good to see you solved your issue. To avoid such problems, make extensive use of anchor points in Unity UI. That will make sure your UI elements stay where you intended.

\$\endgroup\$
0
\$\begingroup\$

It looks like this was an issue of positioning, for some reason the positioning is entirely rigid, so launching the game on my phone the buttons appeared in stupid positions due to the resolution being more than double that expected, further to that, the buttons were absolutely tiny (again due to non-relative sizing).

\$\endgroup\$
  • 1
    \$\begingroup\$ Good to see you solved your issue. To avoid such problems, make extensive use of anchor points in Unity UI. That will make sure your UI elements stay where you intended. \$\endgroup\$ – SanSolo Oct 23 '15 at 7:03
  • \$\begingroup\$ You should post that as an answer, @SanSolo - I didn't give a specific solution, and my solution would naturally have only worked for that specific resolution of device - free brownie points over here! \$\endgroup\$ – XtrmJosh Oct 23 '15 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.