When Sam said we’re going to get all the controllers and he wrote,
TActorRange<AController>(GetWorld()) it did not seem intuitive to me.
I looked in the source code, at the documentation, I googled, and I asked ChatGPT.
UGameplayStatics::GetAllActorsOfClass() or the like is common.
GetAllActorsOfClass() is intuitive. I believe the TActorRange is lighter and what should be used, I think. I understand that it iterates over all the
AController instances and their children in the game world.
My question is, how does someone even find out about TActorRange? It makes me want to look up every class in EngineUtils to see what I’m missing out on. Did you know about TActorRange? How did you find out about it? How do you think most people discover it?