Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: sulbon on November 25, 2014, 05:22:11 AM

Title: [SOLVED]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: sulbon on November 25, 2014, 05:22:11 AM
 >:(

But the 'LateUpdate' in my script on the same GameObject(with UIPanel) is not called.

Could somebody tell my why?
Title: Re: [NGUI]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: Nicki on November 25, 2014, 06:26:07 PM
Because Unity calls it, since it's a monobehavior. See http://docs.unity3d.com/ScriptReference/MonoBehaviour.html
Title: Re: [NGUI]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: sulbon on November 25, 2014, 08:49:37 PM
Hi Nicki, I think I didn't make the question clear.

The 'Update' and 'LateUpdate' are called every frame when Application is playing. It is for sure and I can totally see it.

What I don't see is what magic triggers the UIPanel.LateUpdate not during Game-Running, but when the Animation is editing(in Animation Tab).
Title: Re: [NGUI]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: Nicki on November 26, 2014, 08:38:47 AM
Oh. I believe it will be called when the scene gets updated for whatever reason.
Title: Re: [NGUI]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: ArenMook on November 26, 2014, 08:32:01 PM
[ExecuteInEditMode] above the class name is what makes it possible.
Title: Re: [NGUI]Can't figure out how UIPanel.LateUpdate is called in Animation Playback
Post by: sulbon on November 26, 2014, 09:12:04 PM
Thank you ArenMook and Nicki. [ExecuteInEditMode] works.  ;D