[Request] Add GetAllActors( TArray& OutActors ); to World.h

Please add functions to World.h that allow for searching All Actors. There are functions for getting all matinee actors and getting an actor count. It doesn’t make sense that you can’t get the Actors.

If this function exists sonewhere else please document the process to be used.

Thank you

If you want to iterate over actors you use an iterator like this:

for (FActorIterator It(GetWorld()); It; ++It)
{
	APawn* Pawn = Cast(*It);
	if (Pawn)
	{
		...
	}
}

This is more efficient then copying the large actors array around, and is safer than exposing that array directly.

There are also more efficient iterators for pawns and controllers and playercontrollers, e.g.:

for( FConstPawnIterator Iterator = GetWorld()->GetPawnIterator(); Iterator; ++Iterator )
{
	APawn* Pawn = *Iterator;
	...
}

Thanks, guess the request should be changed that this is added to the documentation.