Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: samurai413x on June 11, 2012, 04:43:29 PM

Title: Atlases not holding as much as they could?
Post by: samurai413x on June 11, 2012, 04:43:29 PM
So I'm starting off with a 2048x2048 atlas (I don't want to use anything larger) with two different window sprites:

(http://i.imgur.com/BaYxt.png)

Notice there is still plenty of room on the right side (around 150 pixels of width).

Then I try to add this 32x1536 gradient strip to tile as a background, and it acts like there is not enough room for it:

(http://i.imgur.com/hCX7j.png)

Anyone know why it can't fit all three?

Side Note: Is 32 pixels not wide enough for that gradient strip?  I get Unity warnings about it occasionally, but it seems to work once I tweak the location on the atlas a little bit.

Title: Re: Atlases not holding as much as they could?
Post by: Nicki on June 11, 2012, 06:42:04 PM
I'm not sure why it's making the atlas so malformed. Might be a bug.

A gradient strip can be 3px wide, if you stretch the width anyway. Use a sliced sprite and put a 1px border on each side.
Title: Re: Atlases not holding as much as they could?
Post by: PhilipC on June 11, 2012, 07:40:15 PM
I have spoken with Mike and he says that this is more of a Unity issue. The issue happens when Unity tries to pack long thin sprites (unfortunately). You could always make the sprite wider or shorter.