public Animator anim; public void Load() { anim.PlayInFixedTime("planet animation"); //Application.LoadLevel(1); } 

But an error occurs

Controller 'Sphere': Transition '' in state 'planet animation' uses the parameter 'which does not exist in controller.

or

Animator does not have an AnimatorController

enter image description here

  • When the animator is on, this animation will start up right away, so why do you need to call this method? - M. Green
  • The errors indicate that you either use invalid parameters, or there is no anim controller on the object at all - Taras Lazoriv LazeR

1 answer 1

  1. Check what parameters are needed when moving to the 'planet animation' animation http://prntscr.com/iye3vk
  2. You have not set anime in the animator. controller http://prntscr.com/iye4eu
  • I have no parameters specified. And about the fact that I have not set anime. the controller - I wanted to clarify - I have an empty GameObject - on which the script hangs and there is a public field in which I pass the animator to the script. And this GameObject itself - I pass for the OnClick event - buttons. At the very object - on the sphere - "Planet Earth" - the anime itself. I did not add a controller - otherwise the animation will play automatically. - BadCatss