Search Unity

UI ...prefabs and iPad retina

Discussion in 'UGUI & TextMesh Pro' started by ade76, Apr 17, 2015.

  1. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Hi

    Sorry for odd subject title but I am struggling with this one.

    I am creating a leaderboard for a game and on the iPad retina my leaderboard prefabs are rendering too small. In the editor they appear fine.

    Below is how it is in editor.... the prefab(white text and image) is full width

    Screen Shot 2015-04-17 at 17.37.33.png


    The following image is a screen grab from the device itself...... IMG_0031.PNG


    I would really appreciate if someone could give me a pointer on where to go to resolve this:/

    thanks in advance
    ade
     
  2. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
    Show us an Inspector view of that "bill" line.
     
  3. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Hi

    Attached is screen shot.... Screen Shot 2015-04-17 at 18.47.19.png

    Now this is NOT my prefab now but what I found interesting is that as soon as turn this into a prefab it goes small on retina as above..... BUT IF i keep it just as a game object (same settings I just don't turn into a prefab) it is the correct size on the retina iPad...


    I have also attached an image which indicates the panel that text field sits in Screen Shot 2015-04-17 at 18.51.32.png


    So it us to do with this width values I guess???? But what I don;t get is why it would render correctly before its turned into a prefab? (I'm a noob)
     
  4. DWilliams

    DWilliams

    Joined:
    Jan 12, 2015
    Posts:
    63
    Maybe it has something to do with when you parent the newly instantiated object to your leaderboard content gameobject. I've seen that cause scaling issues, although usually you would see it in editor.

    You could try SetParent(parentTransform, false) instead of just SetParent(parentTransform) or parent =
     
  5. ade76

    ade76

    Joined:
    Apr 9, 2014
    Posts:
    19
    Wow that seems to have fixed it....thank you. Will test more thoroughly but it is for sure the right size on iPad retina now
    Will