Create a new Animator Controller by right clicking in the project window and selecting Create > Animator Controller and name it. (We have called it BOX_Controller)
Drag the box model into your scene and attach the new Animator Controller to it in the Animator component in the inspector.
Open the Animator Window (Window > Animator). Slect the box model in the Hierarchy window, and drag in the BOX_OPEN animation we created earlire. This will set the open box animation as the default animation. We do this to test whether the animation works. Preview your game and chack that the box lid opens. Now right click on the open box animation in the animator window and delete it.
Drag the idle box animation into the now blank animator window followed by the open box animation. The idle box animation should be orange and the open box animation should be grey.
We now need to set up the parameters and transitions so we can control the animations via script in the next stage. Slect the Parameters tab and click the add icon. Choose Bool from the drop down and name your Parameter OPEN.
Now we will create the transitions. Right click the box idle animation and select Make Transition.
Now drag the transition line to the open box animation to connect the transition.
Now select the transition arrow (It will turn blue) and in the Inspector window uncheck Has Exit Time. Otherwise it will wait for the first idle animation to finish before it triggers the open animation and we want this to happen instantly. Then select the add icon unerconditions and select the OPEN parameter to be true.