- Home /
How to animate a parent object on a button press on a menu
I want to be able to move all of the ui objects move on a button press. I currently have a parent object that holds 1 image and 2 buttons. I want one of those buttons(FightButton) to play the animation that moves the parent object and all the things it contains offscreen. My issue is that the option to animate does not appear when I select the parent object as the object to be modified when FightButton is pressed. I am doing something wrong or is this not the right way to play a parents animation? I already have the animation made, set up and it looks how I want, but I can't make it play on the button press.
Answer by xxmariofer · Feb 13, 2019 at 04:53 PM
hello, add to MainMenu a script, add to that script a method that starts the animation, would be something like getting the reference to animator with the GetComponent method ans just ust animator.Play() for playing yoru animation, not sure if there is other way.
Your answer
Follow this Question
Related Questions
Menu Animation 2 Answers
Menu problem 1 Answer
How make UI scroll movement effect? 1 Answer
How can I make UI button animaion using spritesheet? 0 Answers
Camera shake loop in main menu? 1 Answer