Author Topic: Empty textures on Atlas Maker  (Read 3263 times)

Doyu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • I love games ;)
    • View Profile
    • Mascotas
Empty textures on Atlas Maker
« 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.
Game developer on [Doyu Games.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Empty textures on Atlas Maker
« Reply #1 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.

Doyu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
  • I love games ;)
    • View Profile
    • Mascotas
Re: Empty textures on Atlas Maker
« Reply #2 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?
Game developer on [Doyu Games.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Empty textures on Atlas Maker
« Reply #3 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.