In an animation controller, on an animation state, I used the “Add Behavior” button to generate a C# script. The script came pre-loaded with some using statements and commented out overrides. I uncommented one override and the Unity compiler is throwing errors saying
Assets/rotate_180.cs(8,43): error CS0246: The type or namespace name
animator' could not be found. Are you missing a using directive or an assembly reference? Assets/rotate_180.cs(8,62): error CS0246: The type or namespace name animatorstateinfo’ could not be found. Are you missing a using directive or an assembly reference?
I do have the previous version of unity installed (if that might have anything to do with it)
but right now I am using Unity 5 in 2D.
What is wrong?