Author Topic: UIRect.alpha not work with Unity's Animation Editor(UAE) anymore  (Read 3491 times)

paynechu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
UIRect.alpha not work with Unity's Animation Editor(UAE) anymore
« on: February 12, 2014, 10:02:47 PM »
Early 3.0.x version I still can use Unity's Animation Editor(UAE) to animate the UIRect.alpha.
But latest version of 3.0.x and 3.4.x version the UIRect.alpha no longer can update by UAE.
It show it work in UAE. But when you play it in the playing mode. the alpha cannot update anymore.
I found out because UAE only set directly to the mAlpha attribute not through the property setter.
So the SetDirty cannot be called. I don't know why 3.0.x early version can work.
Can help us to fix this? Still are big feature and most easy way to handle window transaction by UAE. rather then use NGUITweenXXX

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIRect.alpha not work with Unity's Animation Editor(UAE) anymore
« Reply #1 on: February 13, 2014, 12:03:13 AM »
It never worked properly because "MAlpha" is a private variable and should not be visible to Unity. The fact that it shows up is a bug in Unity itself.

To animate alpha of anything, use an intermediate component -- AnimatedAlpha. Animate its value, not the panel/widget's.

paynechu

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 16
    • View Profile
Re: UIRect.alpha not work with Unity's Animation Editor(UAE) anymore
« Reply #2 on: February 13, 2014, 10:10:38 PM »
ic thz  :)