Getting actors using UGamePlayStatics

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.

2 Likes

Wonderful! Thanks for your sharing!

Privacy & Terms