0
\$\begingroup\$

I usually use

currentAnimatorStateInfo.normalizedTime > n 

but is there any better way for this?

I want my animation loop n times and invoke call back.

\$\endgroup\$
2
\$\begingroup\$

enter image description here

blue region is your callback or event. just make an script and set it to object uses this animation. when you select that event, inspector shows field you can enter name of you function. remember script should be attached to that object. you can use an counter in you code to cound how many times this event is called.

enter image description here

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.