Author Topic: Best practise if a UIAtlas is to small (iOS)  (Read 2521 times)

robin1508

  • Guest
Best practise if a UIAtlas is to small (iOS)
« on: September 25, 2012, 02:33:00 AM »
Hi guys,

I'm wondering about the best (fastest) solution if my atlas gets too small. I've developed my iPad GUI with two Atlases, one for the iPad and iPad 2 and one for the iPad 3.
My problem now is that the HiRes Atlas for the iPad 3 gets to small so the Texturepacker of Unity scales and crops all my images in the atlas.
(it took about 1 hour for me to find out that 2048x2048 atlas size is to small because it looked so empty! Texturepacker fail?)

So how to deal with this. Pack all the stuff in the first until it is "full" and pack the missing texture files in a second, third, ... atlas?

How do I realize that the atlas is fully packed? If I add a single texture to a fully packed atlas (even if it looks empty and there is enaugh space for a 50x50 texture), there is no error message or somthing like this, Unity just starts to crop all Images. Even if I delete the last texture that was too much, my atlas is destroyed. I have to delete and recreate it with all the images... This is really annoying!






ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Best practise if a UIAtlas is to small (iOS)
« Reply #1 on: September 25, 2012, 08:22:25 AM »
Yeah, I wish there was a way to tell Unity not to do this... but there doesn't seem to be. The 2048 texture size is particularly sneaky, since in the code I specify 4096 as the max size, and with iOS/Android targeted that gets shrunk to 2048 silently. Have you tried using the alternative texture packer that comes with NGUI? (uncheck the "use unity texturepacker" checkbox)