Stop Animation from Automatically Playing?

I’m new to animating in Unity and I just recently made my first animation in which a door slides open. However, now this animation plays automatically before I can use a script to trigger the animation. How would I go about disabling the ability for this animation to play automatically?

1 Like

Using the Animator component: create a state with no animation in it, and set that as the default state.

After that, you can either

  • add a transition between your new empty state and your animation that depends on a trigger parameter
  • call Animator.Crossfade to start your state
6 Likes

I get what you’re saying and this is exactly what I’m looking to do. However, I don’t fully grasp adding the parameters. I created a trigger and named it “Start” because I want it to start my animation. However, I don’t know how to put this to use.

This doesn’t seam to work. In my case it keeps looping the empty state and doesn’t give control to my game logic.
I have some game logic that translates and rotates my player. And that doesn’t run because the empty state keeps looping.

In a script have the animator assigned and use “variablenameforanimator.SetTrigger(“Start”);”