Author Topic: Replacement for SetAlphaRecursive  (Read 1341 times)

pretender

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 155
    • View Profile
Replacement for SetAlphaRecursive
« on: March 19, 2014, 10:16:13 AM »
Hi! I have this code which doesn't work any more in NGUI3+
I picked it up in here in forums and adopted it. Now I updated to NGUI3 and it doesn't work.

Here is the line of code that I don't know how to fix:

  1. p.SetAlphaRecursive(Mathf.Clamp01(p.alpha + RealTime.deltaTime * 2.5f), false);

I guess that i would need to use p.alpha directly

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Replacement for SetAlphaRecursive
« Reply #1 on: March 20, 2014, 01:49:35 AM »
Alpha is cumulative.

panel.alpha = value is all it takes. No need to do anything recursively.