How can I animate a button that is a child of a canvas?
Hi - How can I animate a button that is a child of a canvas? I have a GO! button that I would like to scale up to prompt users to start a gameplay scene, and my animation runs in the Animator but not in Game mode.
I have tried using a game objects, placing an image as a child of the button, still no luck. Any suggestions on how might I fix it so the prompt animation works? Thank you! - k
Answer by fernforce · Feb 09, 2018 at 06:35 AM
Set this to Animation
Thank you, but unfortunately, that didn't work either - the button still animates in the Animator, but not in Game mode. I appreciate the effort! - k
Is your Animator set as component to the button? Is your animator state name set in the button (script) component of your button as the "Pressed Trigger"? In the Animator is there a transition from "Any State" to your animator state? Or perhaps something else unexpected such as you caused some other action with the button using a script, such as a scene load or setting an active state or covered up the button.
Hi again - I greatly appreciate your help - your remarks led me to check the time scale for the buttons I was looking to animate, and I needed to set the Animator to Unscaled Time. Now the animation works perfectly. Thank you! -k