Version: 2017.2

Animator.GetLayerIndex

Switch to Manual
public int GetLayerIndex (string layerName);