Author Topic: Changing texture at UITexture resets alpha to 1 (after update to 3.8.0)  (Read 1751 times)

smallbit

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Hi
I have a character preview in my game I am changing texture every 3 secs. I first lower the alpha (UIWidget.color.a) by lerp), than flip texture and than lerp alpha to 1. It worked all fine before updating NGUI from 3.0+ to 3.8.0. Now in the moment of switching texture the alpha is reset to 1 (just alpha r.g.b remains the same) which creates an unpleasant effect because next just after that my lerp takes control from 0-1 so I have texture appearing just for a frame. I am changing texture using UITexture.mainTexture =. Any ideas what can be causing this problem and how to tackle it ?

Thanks in Advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
You should be adjusting UIWidget.alpha, not color.a. Nothing in NGUI will change the alpha for you, unless you have some component doing it, such as a button. Assigning UITexture.mainTexture doesn't alter the alpha.