Search Unity

Changed some positions

Discussion in 'Physics' started by nicetry18, Mar 23, 2018.

  1. nicetry18

    nicetry18

    Joined:
    Mar 23, 2018
    Posts:
    2
    Hey guys,

    I changed some positions of labels and textfields in a 3d project. In the preview everything is fine, but in the build these objects are on the wrong (old) position. What's going wrong here?
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Most likely your layout works in one screen size or aspect ratio, but not the one you're running under. In the editor, did you try resizing your Game view or change the aspect ratio towards the top of the window?
     
  3. nicetry18

    nicetry18

    Joined:
    Mar 23, 2018
    Posts:
    2
    Ahhh thanks, in maximized Editor the positions are wrong, too. Yes i wanted these labels to be near of the top of the screen. How can I make sure that it will work in every resolution? It should alwas run in fullscreen, windowd mode is not planned.
     
  4. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    Getting it right will mean some combination of proper anchoring, and potentially use of some of the different UI Layout components. I'd recommend going through some of the UI layout tutorials until you get a hang of the layout options:

    https://unity3d.com/learn/tutorials...41.285903579.1521567671-2004208659.1504138984

    Then, if you still have a specific question, you can post a screenshot of what's happening.