unity get index from enum length code example
Example: unity how to check index of enum
int index = Array.IndexOf(Enum.GetValues(typeof(AnimatorControllerParameterType)), AnimatorControllerParameterType.Bool);
int index = Array.IndexOf(Enum.GetValues(typeof(AnimatorControllerParameterType)), AnimatorControllerParameterType.Bool);