Change scale over time with trigger
Hi all. I want to make an object selection animation - when object is selected, it scales a little up and returns back to normal size. I also want to tie some events to the moment when object size returns to normal. Is there some way to set a trigger like this in Unity?
something like this? AddTweenScale(startScale, endScale, time, EndTweenTriggerFunction)
Or should I use coroutines, add triggers to them etc? What is the best way to do this?
You can use coroutines. You can also use animation with animation event, or just animation and after animation duration you call your EndTweenTriggerFunction (which would maybe also require coroutines). Animations are probably the easiest way to do this, but creating a coroutine for scaling would be better because it would be easier to use on many different objects with different scaling and time parameters.
Your answer
![](https://koobas.hobune.stream/wayback/20220612154719im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to flip a bone without seeing "in between" two keyframes in play mode? 0 Answers
Shop UI Animation is lagging 0 Answers
Legacy Animation Scale Unpredictable if FBX Import Setting Read/Write Enabled = false 0 Answers
How do i make a game object grow (scale) by absorbing another game object? 1 Answer
Character powe messed up when Scale Factor is different than 1 0 Answers