I need to create more layers for the player in the animator controller
I have to code the layer to grab animation from-
how do I find out what number is the layer I don’t see any number in the animator layer window.
please tell me
I know the base layer is coded as -1 I think?? whats next? does it go as a sequence for example starts at -1, then 0 , then 1 then 2 then 3 etc or? what does it start at and can ac layers be customized?
what is the sequence and or how do I find out what number the animator layer is so I can use it to refer in my code
I figured out via Debug.Log that Base Layer is 0 and the following layers go from 1 to n. I have a base layer for a character that is running and another layer for him to greet someone.
public Animator anim;
// Use this for initialization
void Start () {
Debug.Log ("Base: " + anim.GetLayerIndex("Base Layer"));
Debug.Log ("Wave: " + anim.GetLayerIndex("Waving"));
//anim = GetComponent<Animator>();
},I figured out via Debug.Log that the Base Layer is Index 0 and the following Layers are in order from 1 to n.
Debug.Log ("Base: " + anim.GetLayerIndex("Base Layer")); //results in 0
Debug.Log ("Wave: " + anim.GetLayerIndex("Waving")); //results in 1
If you still want an answer you can do an easy test printing the Index of each layer to the console, but I guess it goes from 0, incrementing by one in the order defined in the Animator window.