Hi everyone,

I recently ported Lost Soldiers to mobile. It run great on my phone but I've been told its not optimize for all screen size. I'm not a coding expert and I don't know how to do this. Does anyone know where to start?

thank you.
  • ORK will mostly handle this for you based on your setup.

    The basic setup is handled in Game > Game Settings, where you'll find the Screen/GUI Settings right at the top. Here you'll define the default screen size that all your UI in ORK is designed for, and the GUI Scale Mode handles how it'll be scaled to other resolutions - the default should be Scale To Fit which usually gives a pretty good result.

    If you're dealing with different screen formats, e.g. 4:3, 16:9, 16:10, etc., you can use Own GUI Scale settings of GUI layers (Menus > GUI Layers) to e.g. anchor them to different corners of the screen via the GUI Anchor setting. This e.g. allows you to have your HUDs and menus move with the corner they're anchored to (via their GUI layer).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited May 2021
    I think this is it, I had it as stretch to fit. When I switched it over to scale to fit it kind of messed up my current UI, it got a lot more condense and doesn't fit right at the edge of the screen anymore.

    I try to redo my GUI and make it fit but the GUI editor is showing the HUD at the very edge. Can you show me how to fix this please.

    Thanks again,
    Post edited by Coolstory on
  • The GUI editor uses the screen size you set up as the default screen size (in the game settings). Make sure your default screen size uses a format most of the devices will use, e.g. 16:9 (like 1920x1080 screen size).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I have my screen set up as 1920 x 1080 right now but I'm not sure if that's right. Here is my current setting

    screensize

    It works great on stretch to fit but it look a bit condense in scale to fit. Can you show me how to fix this please.

    Thank you,
  • Can you post screenshots of your UI (in-game) to see how it looks?

    Generally, Stretch To Fill will, well, stretch the UI to fill the whole screen. Scale To Fit will scale it so that the whole UI is visible, but it might have empty areas on the sides, depending on the screen format difference to the default screen size. For such a scenario, you can use the GUI Layers as I explained above.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited May 2021
    With stretch to fill my current screen look like this wich work well for both of my phones:

    Screenshot-578

    When I switch it over to scale to fit it look like this:

    Screenshot-583

    My screen is also 1920x1080 and I'm not sure why it is looking condense.

    Thank you.
    Post edited by Coolstory on
  • Well, you're using Free Aspect in the Unity editor while playing, that'll naturally not really match any screen format :)

    I'd also recommend to use Middle Center GUI anchor when using scale to fit for the default GUI settings, this'll have the UI scaled at the center of the screen instead of on one side.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you that was it. I think everything should be fixed now.

    Thanks.
Sign In or Register to comment.