Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Build & Run on OSX with new 4.6 GUI problem

Discussion in 'UGUI & TextMesh Pro' started by pKallv, Nov 12, 2014.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,125
    I have a Game Scene that is 768 x 1024 and using the 4.6 GUI.

    When I do build and run i do get sort of the correct size for the actual Scene but the GUI is too big. I tried all parameters I could find but could not get it to work.

    As an example I have a button (GUI) in the lower left bottom, which works well in the editor. When I do "Build & Run" 1) I can not select 768 x 1024 resolution, the 1024 x 768 is possible, 2) The button in the lower left is placed on the lower left in the player not the scene. I guess that is due to the canvas.

    As i never done Build & Run before i do not understand how to get this to work, i have searched but not found a solution.

    Another question is regarding web Build & Run, i guess you cannot have a file in that mode, right?

    Here is some screen shots.

    Unity3d editor:

    The main scene



    Observe the button on the lower left.

    In the player:




    The setup scene in the Unity3d editor:



    In the player:



     
    Last edited: Nov 12, 2014
  2. phil-Unity

    phil-Unity

    Unity UI Lead Developer Unity Technologies

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    It doesnt seem like you have set your scene up properly is anchors and everything. What happens in editor if you change the game view size.
     
  3. PeterD

    PeterD

    Joined:
    Feb 6, 2013
    Posts:
    120
    It looks like your anchor points are incorrect. If you look at your setting cog. that appears to be set up correctly and is anchored to the bottom left area.

    The next thing I noticed is that your normal ipad screen is not the correct size. The ipad is a 4/ 3 ratio not a 16/9 so this is always going to end up with borders when transferred to a real ipad from the editor. To correct this create a texture that is 1024 / 768 and import it into unity. create a canvas and add this as the background, then click the native size button (under the image element in the inspector) and the preserve aspect ratio tick box. You can then use this as the template to position your elements and anchor them correctly.
     
  4. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,125
    phil & Peter, i guess you are correct. I have been testing with the anchor points and things are getting better.