Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/Helpers > API/Plugins/PCG/Helpers/UPCGActorHelpers > API/Plugins/PCG/Helpers/UPCGActorHelpers/ForEachActorInLevel
References
| Module | PCG |
| Header | /Engine/Plugins/Experimental/PCG/Source/PCG/Public/Helpers/PCGActorHelpers.h |
| Include | #include "Helpers/PCGActorHelpers.h" |
| Source | /Engine/Plugins/Experimental/PCG/Source/PCG/Private/Helpers/PCGActorHelpers.cpp |
static void ForEachActorInLevel
&40;
ULevel &42; Level,
TSubclassOf< AActor > ActorClass,
TFunctionRef< bool(AActor &42;)> Callback
&41;
Remarks
Iterate over all actors in the level, from the given class, and pass them to a callback
Parameters
| Name | Description |
|---|---|
| Level | The level |
| ActorClass | class of AActor to pass to the callback |
| Callback | Function to call with the found actor. Needs to return a bool, to indicate if it needs to continue (true = yes) |