Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Doyu on January 07, 2015, 10:31:28 AM

Title: Empty textures on Atlas Maker
Post by: Doyu on January 07, 2015, 10:31:28 AM
Hello.
Sometimes I use transparent textures (let's say a 50x50 textures with alpha = 0) and I use Trim Alpha activated on your custom packet in the Atlas Maker. The result is that when using this texture, NGUI (or Unity) is not able to know the real size of this texture and put me something like 300x300 by default.
How should I proceed with this? Of course, I mean in case I want to keep "Trim Alpha" activated. Is it possible?

Thank you.
Title: Re: Empty textures on Atlas Maker
Post by: ArenMook on January 07, 2015, 01:33:06 PM
Why do you do this? If you want an invisible widget, then make one. ALT+SHIFT+W.
Title: Re: Empty textures on Atlas Maker
Post by: Doyu on January 08, 2015, 02:55:42 AM
It's just for conveniences issues.
For examples, let's consider I have a sprite with 9 different textures, let's called them mytexture-001.png, mytexture-002.png, ..., mytexture-009.png
One of them could be just transparent, but it's just much more simple for me to simple replace packs of textures (even if some layout has one transparent portion) than replacing UISprite by invisible widgets.

Anyway, in case I just want to do it: how should I do it? Or am I just not able?
Title: Re: Empty textures on Atlas Maker
Post by: ArenMook on January 08, 2015, 08:53:08 AM
If you don't want to write code that simply disables the sprite when it's not needed (which would be my recommendation) then you will need to create a sprite where at least 1 pixel has something in it, such as alpha of 1/255.