月度存档: 八月 2019

animation修改ngui widget alpha无效的问题

<code>UIPanel.alpha is a property, and Unity is not able to animate properties. What you are animating instead is "MAlpha", I'm guessing -- which is a private variable. The fact that Unity lets you do that is a bug in Unity that has existed for ages.

You need to use an intermediate script -- AnimatedAlpha.

Attach it to your panel (or a widget) and animate its alpha instead of the panel when using the Unity's animation system.</code>