Author Topic: Transparent Texture with UITexture ?  (Read 1824 times)

sgolby

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Transparent Texture with UITexture ?
« on: March 07, 2014, 04:23:00 PM »
I can't seem to get UITexture to show a transparent .png texture right.

I have a large texture which gets very limited use so I don't want to add it to the atlas as we're close to 1024px.  It has some rounded edges which are transparent, but they are showing as solid white when using an UITexture & the Unlit/Texture shader. The Preview shows it with rounded/grey edges so that appears to have picked up the transparency and I've tried quite a few import setting combos GUI/Texture/Alpha is Transparency but so far having cracked how to make it look right on screen.

Any ideas if it's possible to have a transparent section in a UITexture ?

Thanks,
Scott

ShinyMark

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 11
    • View Profile
Re: Transparent Texture with UITexture ?
« Reply #1 on: March 07, 2014, 07:22:10 PM »
Unlit/Texture is an opaque shader. Use a material with a shader that supports transparency.

You can either feed the UITexture component a material that is using something like Unlit/Transparent or feed the shader to it directly via the inspector.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Transparent Texture with UITexture ?
« Reply #2 on: March 08, 2014, 01:06:01 PM »
Nowhere in NGUI do I use the Unlit/Texture shader. In fact that shader doesn't exist anymore. It was removed a long time ago, which leads me to believe that either your version of NGUI is out of date, or you didn't follow upgrade instructions, or you're using a free version of NGUI.