1

How to scale the layout/screen smaller on mobile phones?

I know Project Settings / FULL SCREEN IN BROWSER setting fixes scaling issue on phone, but I don't want to open my game always in Full Screen, full screen is necessary only on small size mobile phones.

Can I somehow check the screen resolution on start of layout and adjust the size of layout runtime?

Tom
  • 6,725
  • 24
  • 95
  • 159

1 Answers1

0

A little late, but maybe for the next guy:

You could use a system condition to compare WindowWidth or WindowHeight. If it is under a certain threshold, maybe 1024, then use the Browser object to request FullScreen in an action.

Personally, I would expect the app to run full screen on touch devices, so I use the touch object for On Any Touch and then request full screen using the Browser object.

Note: To request full screen, there must be a user action, so you need to put your request inside an event for a button press, tap, etc. Anything generated by the user.

Jeff Neet
  • 734
  • 1
  • 8
  • 22