Get the index of the first active child
private int GetFirstActiveindex(GameObject _parentObject)
{
for (int i = 0; i < _parentObject.transform.childCount; i++)
{
if (_parentObject.transform.GetChild(i).gameObject.activeSelf == true) return i;
}
return 0;
}