Author Topic: Filled Sprite Invisible  (Read 5523 times)

vexir

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 47
    • View Profile
Filled Sprite Invisible
« on: December 05, 2013, 05:21:34 PM »
What are some reasons a filled sprite might be invisible? I'm monitoring the fill amount and it seems to be operating correctly - stepping into the FilledFill function shows that the alpha is normal. The thing just doesn't show up. And then sometimes it does.

No idea what causes it to disappear!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Filled Sprite Invisible
« Reply #1 on: December 06, 2013, 04:12:40 AM »
If its fillAmount is zero, it won't be drawn.

vexir

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 47
    • View Profile
Re: Filled Sprite Invisible
« Reply #2 on: December 06, 2013, 12:24:39 PM »
Yeah, I know that. Sorry, what I meant by monitoring the fill amount is that I'm looking at the fillAmount in the inspector as the game plays and it's value is being correctly set to be > 0.0f.

Like I said, most of the time it works fine. Under certain conditions (that I'm not able to pinpoint), it doesn't show anything at all, even though the fill amount is greater than 0.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Filled Sprite Invisible
« Reply #3 on: December 06, 2013, 02:21:33 PM »
In which version of NGUI?

vexir

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 47
    • View Profile
Re: Filled Sprite Invisible
« Reply #4 on: December 06, 2013, 02:36:59 PM »
How can I tell which specific version I'm on?

I had a discovery - if I increase the depth of the widget AFTER I have already launched the game, it becomes visible. However, if I stop the game and then set the widget to that same depth value, it no longer shows up. I increase the depth again during run, and it becomes visible.

What's up with that?

vexir

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 47
    • View Profile
Re: Filled Sprite Invisible
« Reply #5 on: December 06, 2013, 08:38:59 PM »
I went ahead and spent some time upgrading to 3.0.6. Bug fixed :)