Hi there!
Recently I have been working on a small project just to see if I can can a gun model I have attached to a default Character Controller to both shoot and reload using an animation. I have all the animations I need, however when I use:
if (Input.GetKey(KeyCode.R))
{
animation.Play("MachineGun_reload", PlayMode.StopAll);
}
in-game runtime, I get an error that the animation state “MachineGun_reload” cannot play because it cannot find it. What does this mean? I have an animation component attached to the Character Controller along with the animation name that i selected. Do need to reference it in some way? I have tried adding it to the animations list, but it still cannot either find the default animation or cannot play it cause it can’t find it.
Any help would be greatly appreciated. Thanks,
Whutchison