Author Topic: After changing sprites on runtime some appear transparent  (Read 2778 times)

bodosaher

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
After changing sprites on runtime some appear transparent
« on: July 26, 2014, 07:11:25 AM »
So I have a set of UI-Sprites who are set to one different sprite and on level start I change those sprites to a different one from the atlas but some of them appear half transparent for no reason ever and in the color section the alpha is normal, So why are they transparent even though the alpha haven't changed?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #1 on: July 27, 2014, 03:10:10 AM »
Assuming you don't have some semi-transparent widget or panel on the parent object of that sprite, there is no reason for this to happen in NGUI.

All alpha is cumulative, so check your hierarchy.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #2 on: July 27, 2014, 09:13:18 AM »
$10 says a parent has its alpha set lower than 1.

bodosaher

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #3 on: July 27, 2014, 02:01:25 PM »
They all share the same parent  ???
And yes there is no reason for NGUI to do that, Its very weird. I assign about 30 sprites on start and about 5 random ones of those get the problem. (Everytime the wrong ones change)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #4 on: July 27, 2014, 11:11:55 PM »
Make sure you only have 1 widget per game object. If you can't figure it out, you can submit a repro case for me to have a look at -- support at tasharen.com.

bodosaher

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #5 on: August 02, 2014, 08:47:19 AM »
What is a repro case? And I cant find any support link on tasharen.com.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #6 on: August 03, 2014, 09:29:07 AM »
Repro case is a reproducible project for me to look at. I'm saying if you have no more than 1 widget per game object and can't figure out why this is happening, you can submit a project for me to look at via email to support at tasharen.com.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: After changing sprites on runtime some appear transparent
« Reply #7 on: August 03, 2014, 02:56:03 PM »
(The "at" is a @)