Mecanim Animator Layers_How does the Script Access the layer's animations?

I followed the Mecanim tutorial, and have since been modifying the character controller to fit our needs.
The Base Layer and Layer 2 are working just fine, but I can’t get anything to animate on a third layer.

I’ve done the following in the controller script for layer 3 as it appears for layer 2

private AnimatorStateInfo layer3CurrentState;

layer3CurrentState = anim.GetCurrentAnimatorStateInfo (2);

Is there something else I need to do to tell the script how to access the third layer’s animations?

thanks

nevermind, figured it out.

Where it assigned the layer weight of layer 2

if(anim.layerCount >=2)
anim.SetLayerWeight(1, 1)

realized the script was only setting layer weight for layer 2. For anyone who searches/stumbles upon this, the fix is below.

if(anim.layerCount >=2)
{
for(int i=0; i<anim.layerCount; i++)
anim.SetLayerWeight(i,1);
}

this will tell it to go through every layer and set its weight to 1.