Problem with Entry state

I’m following this tutorial:


The guy in the video doesn’t have an entry state and it’s impossible to remove the entry state. I’ve written the following code as per the tutorial to set which state to start:

void Update () 
	{
		setAnimation (4);
	}

	void setAnimation(int animationNumber)
	{
		if (animationNumber == anim.GetInteger("animation") || -animationNumber == anim.GetInteger("animation")) 
		{
			anim.SetInteger ("animation", -animationNumber);
		} 
		else 
		{
			anim.SetInteger ("animation", animationNumber);
		}

	}

So it should be beginning with the fourth state but instead it begins with the default state I’ve set the entry state as and there is no way to remove it, so I’m not sure what to do. This is what it looks like in the base layer:

53126-states-unity.png

You can ignore the green entry state that was added in a recent version of unity it always points to the orange default state and just helps show where things start. The animation system is not my strong point and I don’t have time to watch the full tutorial. But try right clicking on the Player_Run_Right and setting that as the default state as it appears in the tutorial.

After that the thing to check is your transitions and that they are comparing the animation variable correctly.