[Solved]Argument is out of range.

public void UpdateResearchScreen()
    {
        Debug.Log(techButtons.Count);
        for (int i = 0; i < techButtons.Count; i++)
        {
            Debug.Log(i);
            if (techButtons[i] != null)
            {
                Debug.Log("yes");
                techButtons[i].gameObject.GetComponent<TechButton>().UpdateButton();
            }
        }
    }

it prints yes
tried many versions, with and without gameObject. with and without techButtons != null
techButtons is List
UpdateButton is method in script TechButton that is in button from that list of buttons. as you can see it pass empty check but still says out of range. happens at index 0
thanks

Cant delete thread. i was hasty as problem was in update function. called list check before updating list