FActorIteratorState

Abstract base class for actor iteration.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/EngineUtils.h

Include

#include "EngineUtils.h"

Syntax

class FActorIteratorState

Remarks

Abstract base class for actor iteration. Implements all operators and relies on IsActorSuitable to be overridden by derived class. Note that when Playing In Editor, this will find actors only in CurrentWorld.

Variables

Name Description

Public variable

FDelegateHandle

 

ActorSpawnedDelegateHandle

Handle to the registered OnActorSpawned delegate

Public variable

int32

 

ConsideredCount

Number of actors that have been considered thus far

Public variable

AActor *

 

CurrentActor

Current actor pointed to by actor iterator

Public variable

UWorld *

 

CurrentWorld

Current world we are iterating upon

Public variable

UClass *

 

DesiredClass

The class type we are iterating, kept for filtering

Public variable

int32

 

Index

Index of the current element in the object array

Public variable

TArray< UObject...

 

ObjectArray

Results from the GetObjectsOfClass query

Public variable

bool

 

ReachedEnd

Whether we already reached the end

Public variable

TArray< AActor ...

 

SpawnedActorArray

Contains any actors spawned during iteration

Constructors

Name Description

Public function

FActorIteratorState

(
    UWorld* InWorld,
    TSubclassOf< AActor > InClass
)

Default ctor, inits everything

Destructors

Name Description

Public function

~FActorIteratorState()

Functions

Name Description

Public function Const

AActor *

 

GetActorChecked()

Returns the current suitable actor pointed at by the Iterator

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback