Any idea on how to make objects be clicked in a certain order? (C#)

I have a list of clickable objects, where the index of the list also corresponds to the order in which the objects need to be clicked. The list gets emptied and refilled with a random amount of new objects every level (up to around 16) so I cant do it with cases (at least I dont think). Is there some way to deal with this?

Thanks in advance

If you already have a list of the gameobjects in the order that they need to be clicked, couldn’t you compare that object in the list against the one that’s been clicked? Something like this:

int clickedIndex = 0;

// Wait for click
// Get clicked object

if (clickedObject == clickedObjectList[clickedIndex])
{
// do stuff
clickedIndex++;
}