Triggering animation and attack state from our code

This topic covers the few lectures where we are adding code to our trigger our animation states and ultimately having the enemy damage the player. Any thoughts or questions?

Maybe this is new with Unity 2019.x (I’m in 2019.2) but I noticed now you can access private methods in Animation Events where previously the needed to be public. I don’t know if there are set backs to this but you can also see in Rick’s video he has access to all of the methods within EnemyAI.cs.

At the very least it lets your protect your code a little better.

1 Like