From the course: Unity 5: Build a Character Dialogue System

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

The Animation Manager

The Animation Manager - Unity Tutorial

From the course: Unity 5: Build a Character Dialogue System

Start my 1-month free trial

The Animation Manager

- [Instructor] Our animations are looking pretty slick, but we need a manager's script to handle how we access and trigger them. Let's go back into our scripts folders in our project and create a new script. Right-click, create, C# script. Name it animation manager and open it up in MonoDevelop. We're not going to need the starter update functions for this one, so let's go ahead and delete those. However, we are going to use the IManager interface, so after MonoDevelop add a comma and IManager. Like our other manager scripts, we need to have a current state and a boot sequence. On line seven, public manager state current state public getter private setter. Then on line nine, public void boot sequence. Let's actually think about what the animation manager is going to do. It's going to grab the animator component off our canvas object, then it's going to change our intro animation in parameter, but first let's fill in the boot sequence. We're going to start with our debug log…

Contents