Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on May 08, 2013, 02:15:25 AM

Title: ActiveAnimation.Play from the current animation state
Post by: laurentl on May 08, 2013, 02:15:25 AM
Let's say the object is already at the end of animation A, if I call ActiveAnimation.Play(A) I don't want it to play A from the beginning but from the end (ie: nothing moves)

How do I do that?
Title: Re: ActiveAnimation.Play from the current animation state
Post by: ArenMook on May 08, 2013, 02:24:35 AM
Don't use ActiveAnimation for that. ActiveAnimation is for timeScale-independent UI animation. What you're trying to do should be done with just animation.Play.
Title: Re: ActiveAnimation.Play from the current animation state
Post by: laurentl on May 08, 2013, 02:33:24 AM
I do want timeScale independent animation so that works perfectly. Also ActiveAnimation handles the active/inactive for me, which is perfect for what I do (hide unhide panels in a showy way)
What I want is to start with the last animation state if it's playing the same animation clip.
(and yes I know I can hack ActiveAnimation)
Title: Re: ActiveAnimation.Play from the current animation state
Post by: ArenMook on May 08, 2013, 05:31:23 PM
So before playing the animation, check to see if it's already playing.