Author Topic: Problem with getting retina UI working!  (Read 2376 times)

adaml

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Problem with getting retina UI working!
« on: January 17, 2013, 05:59:35 AM »
Hi,

I am having some trouble getting retina graphics working with my app. I have set up a SD and HD atlas and set all my UI sprites to use a reference atlas.
When the scene loads in the awake function i have the reference atlas object in my scene with a script on that switches the replacement variable with either the HD or SD atlas. I have tried both loading them from resources or just putting a reference to them at the top.
When i step into it the replacement does get set to either the HD or SD atlas but the actual UI never gets updated to use HD or SD. If i set the prefab before runtime to HD or SD it uses the correct images but when i switch at runtime it never updates....
Am i missing something?  :o

Thanks 
Adam

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with getting retina UI working!
« Reply #1 on: January 17, 2013, 09:36:37 PM »
How do you switch the atlas? There have been several atlas switching scripts posted on this forum that seem to work well.

adaml

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Problem with getting retina UI working!
« Reply #2 on: January 18, 2013, 06:37:32 AM »
Ah yea i managed to find a scrips to swap the atlases so its now uses HD graphics :D I am having another couple of issues though i am using an image button and when its pressed the size rescales to really small?. Also some other sprites arnt sizing correctly they are 9 slices and slice in the same place at the SD atlas but they are the wrong scale any ideas what up?

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with getting retina UI working!
« Reply #3 on: January 19, 2013, 01:57:17 AM »
Sounds like you didn't set your pixel size correctly on your atlas.

adaml

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: Problem with getting retina UI working!
« Reply #4 on: January 21, 2013, 10:37:34 AM »
Ahhhh yes that was the issue thanks!!  :D