If you want to use same function than in blueprints, you don’t necessary need to use Actor Iterator if you don’t like. You can type UGameplayStatics::GetAllActorsOfClass(GetWorld(), YourClass::StaticClass(), FoundActors);
FoundActors is a TArray of Actors.