Search Unity

how to scale my game in a world space

Discussion in 'UGUI & TextMesh Pro' started by jeroenblommendaal, Mar 18, 2019.

  1. jeroenblommendaal

    jeroenblommendaal

    Joined:
    Jan 3, 2019
    Posts:
    1
    Hey guys,

    This is my first game and I'm trying to make this work for two days now without succes.
    this is my scene:
    upload_2019-3-18_15-59-55.png
    My game exists of 2D UI and a 3D planet. 3 panels surrounding a camera in the middle. Upon clicking on the arrow in the top left or top right it will turn the camera 90degrees and show the other panel.
    The panels you see are all part of a canvas which is only used as a UI container that is not really use in any other way.
    After creating my first apk and put it on my phone(1080*2340 resolution) I noticed it is not scaling correctly (it is scaling to the height and results in missing some UI on the left and right)
    since im using worldspace render mode I cannot use canvas scaler.
    Is there any way to automatically scale my panels to fit the device's resolution? And how will I keep my camera at the right place?
    I tried playing with other render modes and camera setting but nothing gives me a result like this.
    If anyone can please help me out I will be forever grateful :)

    cheers
     
  2. EbonDust

    EbonDust

    Joined:
    Oct 8, 2013
    Posts:
    50
    If the ui is supposed to scale with the screen size and be on top why do you want it to be world space? Also after typing: "unity world space ui scale screen size" in google i got some results and first one seems to have an answer.