Version: 2017.1

Animator.GetLayerIndex

Switch to Manual
public int GetLayerIndex (string layerName);