I used a for each loop instead! I also use getters and setters

uint32 index = 0;
for (UWidget* item : SessionsList->GetAllChildren()) 
{
	USessionItem* sessionItem = Cast<USessionItem>(item);
	if (sessionItem != nullptr) 
	{
		bool result = (SelectedIndex.IsSet() && SelectedIndex.GetValue() == index);
		sessionItem->SetIsSelected(result);
	}
	++index;
}
1 Like

Privacy & Terms