Hi guys, I’m a bit stuck on how to play an animation from a script, I can’t find a good tutorial for this.
I’m trying to slide a panel in and out. I have an animator component on my panel. The first animation slides the panel in when it’s active. This works great. But now I need to activate the second animation, but not sure how to reference it.
All my code is in a script attached to the GameController, not on the panel (which I’m calling “ScorePanel”).
I thought this would work, but doesn’t:
ScorePanel.GetComponent.<Animation>().Play(PanelSlideOut);