Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/RuntimeGen
References
| Module | PCG |
| Header | /Engine/Plugins/PCG/Source/PCG/Public/RuntimeGen/PCGRuntimeGenScheduler.h |
| Include | #include "RuntimeGen/PCGRuntimeGenScheduler.h" |
Syntax
class FPCGRuntimeGenScheduler
Remarks
The Runtime Generation Scheduler system handles the scheduling of PCG Components marked as GenerateAtRuntime. It searches the level for Partitioned and Non-Partitioned components in range of the currently active UPCGGenSources in the level, and schedules them efficiently based on their UPCGSchedulingPolicy, creating APCGPartitionActors as necessary to support hierarchical generation.
APCGPartitionActors can be created/destroyed on demand or provided by a dynamically growing pool of actors. If enabled, the pool will double in capacity anytime the number of available PAs reaches zero.
Components and PartitionActors created by the Runtime Generation Scheduler should be managed exclusively by the runtime gen scheduling system.
Constructors
| Type | Name | Description | |
|---|---|---|---|
FPCGRuntimeGenScheduler
(
const FPCGRuntimeGenScheduler& |
|||
FPCGRuntimeGenScheduler
(
FPCGRuntimeGenScheduler&& other |
|||
FPCGRuntimeGenScheduler
(
UWorld* InWorld, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddPartitionActorPoolCount
(
int32 Count |
Adds Count new RuntimeGen PAs to the Runtime PA pool. | |
| void | CleanupComponent
(
const FGridGenerationKey& GenerationKey, |
Cleanup a component and remove it from the GeneratedComponents set. | |
| void | Remove components from the GeneratedComponents set that have been marked for delayed refresh. | ||
| void | CleanupLocalComponents
(
const APCGWorldActor* InPCGWorldActor |
Cleanup all local components in the GeneratedComponents set. | |
| void | Destroy all runtime gen partition actors (both generated and pooled). Executed in next tick. | ||
| APCGPartitionActor * | GetPartitionActorFromPool
(
const FPCGGridDescriptor& GridDescriptor, |
Grabs an empty RuntimeGen PA from the PartitionActorPool and initializes it at the given GridSize and GridCoords. | |
| void | OnOriginalComponentRegistered
(
UPCGComponent* InOriginalComponent |
||
| void | OnOriginalComponentUnregistered
(
UPCGComponent* InOriginalComponent |
||
| void | RefreshComponent
(
UPCGComponent* InComponent, |
Refresh a generated component. | |
| void | ResetPartitionActorPoolToSize
(
uint32 NewPoolSize |
Destroy all pooled partition actors and rebuild with the NewPoolSize. | |
| bool | ShouldTick () |
Returns true if the scheduler should tick this frame. | |
| void | Tick
(
APCGWorldActor* InPCGWorldActor |
||
| void | TickCleanup
(
const TSet< IPCGGenSourceBase* >& GenSources, |
Perform immediate cleanup on components that become out of range. | |
| void | TickCVars
(
const APCGWorldActor* InPCGWorldActor |
Detects changes in RuntimeGen CVars to keep the PA pool in a valid state. | |
| void | TickQueueComponentsForGeneration
(
const TSet< IPCGGenSourceBase* >& GenSources, |
Queue nearby components for generation. | |
| void | TickScheduleGeneration
(
TMap< FGridGenerationKey, double >& ComponentsToGenerate |
Schedule generation on components in priority order. |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FPCGRuntimeGenScheduler & | operator=
(
FPCGRuntimeGenScheduler&& other |
||
| FPCGRuntimeGenScheduler & | operator=
(
const FPCGRuntimeGenScheduler& other |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FGridGenerationKey |