Hi,
i animated an object, but when i press the play button, the animation doesn’t works, i need to seperately play the animation…what to do in order to make it playable at run time ??
Hi,
i animated an object, but when i press the play button, the animation doesn’t works, i need to seperately play the animation…what to do in order to make it playable at run time ??
If you want the animation to play as soon as the game starts, click on the game object in the Hierarchy view, then in the inspector panel you should see an animation section. Make sure the default animation is set to the animation you want to play and check “Play Automatically”.
If you want to trigger the animation from a script, take a look at Unity - Scripting API: Animation
hii, i tried as u explained…
see the image
there is 1 error coming when i drag the anim file to Animation… Animation does not start if i do not drag the file, error and animation both comes when i drag animation file to Animation…
in front of element 0, animation is pre assigned and Play automatically is also ticked by default…
What was the error saying…?
Where did you drag the animation file from?
how i drag -
i select the object [dog-braco] from hierarchy and drag it to the inspector under “Animation” , there is a field “Animation” , i drag the animation script seen under “Project” to it…
then 1 animation cycle starts but not loop , with an error in console
NullReferenceException: Object reference not set to an instance of an object
see the image you will understand everything