Navigation
API > API/Plugins > API/Plugins/PCG
| Name | UPCGSubsystem |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/PCGSubsystem.h |
| Include Path | #include "PCGSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UPCGSubsystem : public UTickableWorldSubsystem
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UPCGSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UPCGSubsystem
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPCGSubsystem() |
PCGSubsystem.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FConstructionScriptSourceComponents | TMap< FName, TObjectKey< UPCGComponent > > | PCGSubsystem.h | |
| FTickAction | TFunction< void()> | Adds an action that will be executed once at the beginning of this subsystem's next Tick(). | PCGSubsystem.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DisablePartitionActorCreationForWorld | TSet< UWorld * > | PCGSubsystem.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FPCGActorAndComponentMapping | friend | PCGSubsystem.h | ||
| OnComponentGenerationCompleteOrCancelled | FPCGOnComponentGenerationCompleteOrCancelled | PCGSubsystem.h | ||
| OnComponentUnregistered | FPCGOnComponentUnregistered | PCGSubsystem.h | ||
| OnPCGComponentGenerationDone | FPCGOnPCGComponentGenerationDone | PCGSubsystem.h | ||
| OnPCGComponentUnregistered | FPCGOnPCGComponentUnregistered | PCGSubsystem.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActorAndComponentMapping | TUniquePtr< FPCGActorAndComponentMapping > | PCGSubsystem.h | ||
| BeginTickActions | TArray< FTickAction > | Functions will be executed at the beginning of the tick and then removed from this array. | PCGSubsystem.h | |
| bHasTickedOnce | bool | PCGSubsystem.h | ||
| GraphExecutor | TSharedPtr< FPCGGraphExecutor > | PCGSubsystem.h | ||
| PCGWorldActor | APCGWorldActor * | PCGSubsystem.h | ||
| PCGWorldActorLock | FCriticalSection | PCGSubsystem.h | ||
| PerActorConstructionScriptSourceComponents | TMap< TObjectKey< AActor >, FConstructionScriptSourceComponents > | PCGSubsystem.h | ||
| RuntimeGenScheduler | FPCGRuntimeGenScheduler * | PCGSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildLandscapeCache
(
bool bQuiet, |
Builds the landscape data cache. | PCGSubsystem.h | |
void CancelAllGeneration() |
Cancels everything running | PCGSubsystem.h | |
void CancelGeneration
(
UPCGGraph* Graph |
Cancels currently running generation on given graph | PCGSubsystem.h | |
void CancelGeneration
(
UPCGComponent* Component |
Cancels currently running generation | PCGSubsystem.h | |
void CleanFromCache
(
const IPCGElement* InElement, |
Cleans up the graph cache on an element basis. InSettings is used for debugging and is optional. | PCGSubsystem.h | |
void CleanupAllPCGComponents
(
bool bPurge |
Will gather all the components registered, and ask for cleanup. | PCGSubsystem.h | |
void CleanupLocalComponentsImmediate
(
UPCGComponent* InOriginalComponent, |
Immediately cleanup the local components associated with an original component. | PCGSubsystem.h | |
void ClearExecutedStacks
(
const UPCGGraph* InContainingGraph |
PCGSubsystem.h | ||
void ClearExecutedStacks
(
const FPCGStack& BeginningWithStack |
PCGSubsystem.h | ||
void ClearExecutedStacks
(
const UPCGComponent* InRootComponent |
PCGSubsystem.h | ||
void ClearExecutionMetadata
(
UPCGComponent* InComponent |
PCGSubsystem.h | ||
void ClearExecutionMetadata
(
const FPCGStack& BaseStack |
PCGSubsystem.h | ||
void ClearLandscapeCache() |
Clears the landscape data cache | PCGSubsystem.h | |
void ClearOutputData
(
FPCGTaskId InTaskId |
Clears the output data for a given task. | PCGSubsystem.h | |
void ClearPCGLink
(
UPCGComponent* InComponent, |
Move all resources from sub actors to a new actor | PCGSubsystem.h | |
void CreateMissingPartitionActors() |
PCGSubsystem.h | ||
void DeleteSerializedPartitionActors
(
bool bOnlyDeleteUnused, |
Delete serialized partition actors in the level. | PCGSubsystem.h | |
void DestroyAllPCGWorldActors() |
PCGSubsystem.h | ||
void DestroyCurrentPCGWorldActor() |
PCGSubsystem.h | ||
void DirtyGraph
(
UPCGComponent* Component, |
Immediately dirties the partition actors in the given bounds | PCGSubsystem.h | |
APCGPartitionActor * FindOrCreatePCGPartitionActor
(
const FGuid& Guid, |
PCGSubsystem.h | ||
APCGPartitionActor * FindOrCreatePCGPartitionActor
(
const FPCGGridDescriptor& GridDescriptor, |
Creates a new partition actor if one does not already exist with the same grid size, coords, and generation mode. | PCGSubsystem.h | |
APCGWorldActor * FindPCGWorldActor() |
PCGSubsystem.h | ||
void FlushCache() |
Flushes the graph cache completely, use only for debugging | PCGSubsystem.h | |
void ForAllIntersectingPartitionedComponents
(
const FBoxCenterAndExtent& InBounds, |
Get all components in specified bounds. | PCGSubsystem.h | |
FPCGTaskId ForAllOverlappingCells
(
UPCGComponent* InPCGComponent, |
PCGSubsystem.h | ||
FPCGTaskId ForAllOverlappingCells
(
const FBox& InBounds, |
Call InFunc to all partition grid cells matching 'InGridSizes' and overlapping with 'InBounds'. | PCGSubsystem.h | |
void ForAllOverlappingComponentsInHierarchy
(
UPCGComponent* InComponent, |
Traverses the hierarchy associated with the given component and calls InFunc for each overlapping component. | PCGSubsystem.h | |
void ForAllRegisteredIntersectingLocalComponents
(
UPCGComponent* InOriginalComponent, |
Call the InFunc function to all local component registered to the original component within some bounds. | PCGSubsystem.h | |
void ForAllRegisteredLocalComponents
(
UPCGComponent* InOriginalComponent, |
Call the InFunc function to all local component registered to the original component. Thread safe | PCGSubsystem.h | |
void GenerateAllPCGComponents
(
bool bForce |
Will gather all the components registered, and ask for generate. | PCGSubsystem.h | |
TArray< UPCGComponent * > GetAllIntersectingComponents
(
const FBoxCenterAndExtent& InBounds |
Gather all the PCG components within some bounds. | PCGSubsystem.h | |
TSet< UPCGComponent * > GetAllRegisteredComponents() |
PCGSubsystem.h | ||
TSet< UPCGComponent * > GetAllRegisteredPartitionedComponents() |
PCGSubsystem.h | ||
IPCGGraphCache * GetCache() |
Returns the interface to the cache, required for element per-data caching | PCGSubsystem.h | |
UPCGComputeGraph * GetComputeGraph
(
const UPCGGraph* InGraph, |
PCGSubsystem.h | ||
TArray< FPCGStack > GetExecutedStacks
(
const UPCGComponent* InComponent, |
PCGSubsystem.h | ||
TArray< FPCGStack > GetExecutedStacks
(
const FPCGStack& BeginningWithStack |
PCGSubsystem.h | ||
FPCGGenSourceManager * GetGenSourceManager() |
PCGSubsystem.h | ||
uint32 GetGraphCacheEntryCount
(
IPCGElement* InElement |
Returns how many times InElement is present in the cache. | PCGSubsystem.h | |
FPCGGraphCompiler * GetGraphCompiler() |
PCGSubsystem.h | ||
UPCGLandscapeCache * GetLandscapeCache() |
PCGSubsystem.h | ||
UPCGComponent * GetLocalComponent
(
const FPCGGridDescriptor& GridDescriptor, |
Retrieves a local component using grid descriptor and grid coordinates, returns nullptr if no such component is found. | PCGSubsystem.h | |
UPCGComponent * GetLocalComponent
(
uint32 GridSize, |
PCGSubsystem.h | ||
const FPCGNodeVisualLogs & GetNodeVisualLogs() |
Get graph warnings and errors for all nodes. | PCGSubsystem.h | |
FPCGNodeVisualLogs & GetNodeVisualLogsMutable() |
PCGSubsystem.h | ||
bool GetOutputData
(
FPCGTaskId InTaskId, |
Gets the output data for a given task | PCGSubsystem.h | |
TSet< TObjectPtr< APCGPartitionActor > > GetPCGComponentPartitionActorMappings
(
UPCGComponent* InComponent |
Retrieves partition actors for this original component | PCGSubsystem.h | |
APCGWorldActor * GetPCGWorldActor() |
PCGSubsystem.h | ||
APCGPartitionActor * GetRegisteredPCGPartitionActor
(
uint32 GridSize, |
PCGSubsystem.h | ||
APCGPartitionActor * GetRegisteredPCGPartitionActor
(
const FPCGGridDescriptor& GridDescriptor, |
Retrieves a registered partition actor using grid size and grid coordinates, returns nullptr if no such partition actor is found. | PCGSubsystem.h | |
FPCGRuntimeGenScheduler * GetRuntimeGenScheduler() |
PCGSubsystem.h | ||
bool GetStackContext
(
UPCGGraph* InGraph, |
Gets the base execution stack information for a specific graph & grid size. | PCGSubsystem.h | |
bool GetStackContext
(
const UPCGComponent* InComponent, |
Gets the execution stack information for the given component (depending on partitioning, grid size, etc.) but with no component frames. | PCGSubsystem.h | |
bool IsAnyGraphCurrentlyExecuting() |
Returns true if any task is scheduled or executing for any graph | PCGSubsystem.h | |
bool IsGraphCacheDebuggingEnabled() |
True if graph cache debugging is enabled. | PCGSubsystem.h | |
bool IsGraphCurrentlyExecuting
(
UPCGGraph* Graph |
Returns true if there are any tasks for this graph currently scheduled or executing. | PCGSubsystem.h | |
bool IsInitialized() |
Subsystem must not be used without this condition being true. | PCGSubsystem.h | |
void LogAbnormalComponentStates
(
bool bGroupByState |
PCGSubsystem.h | ||
void NotifyGraphChanged
(
UPCGGraph* InGraph, |
Propagate to the graph compiler graph changes | PCGSubsystem.h | |
void NotifyLandscapeEditModeExited() |
Notify that we exited the Landscape edit mode. | PCGSubsystem.h | |
void OnOriginalComponentRegistered
(
UPCGComponent* InComponent |
PCGSubsystem.h | ||
void OnOriginalComponentUnregistered
(
UPCGComponent* InComponent |
PCGSubsystem.h | ||
void OnPCGQualityLevelChanged() |
PCGSubsystem.h | ||
void OnScheduleGraph
(
const FPCGStackContext& StackContext |
Called by graph executor when a graph is scheduled. | PCGSubsystem.h | |
void PropagateEditingModeToLocalComponents
(
UPCGComponent* InOriginalComponent, |
Propagates transient state change from an original component to the relevant partition actors | PCGSubsystem.h | |
void RefreshAllComponentsFiltered
(
const TFunction< bool(UPCGComponent*)>& ComponentFilter, |
Refresh all components selected by the filter (runtime generated or otherwise). | PCGSubsystem.h | |
void RefreshAllRuntimeGenComponents
(
EPCGChangeType ChangeType |
Asks the runtime generation scheduler to refresh all GenerateAtRuntime components. | PCGSubsystem.h | |
void RefreshRuntimeGenComponent
(
UPCGComponent* RuntimeComponent, |
Asks the runtime generation scheduler to refresh a given GenerateAtRuntime component. | PCGSubsystem.h | |
void RegisterBeginTickAction
(
FTickAction&& Action |
PCGSubsystem.h | ||
bool RegisterOrUpdatePCGComponent
(
UPCGComponent* InComponent, |
Register a new PCG Component or update it, will be added to the octree if it doesn't exists yet. | PCGSubsystem.h | |
void RegisterPartitionActor
(
APCGPartitionActor* InActor |
Register a new Partition actor, will be added to a map and will query all intersecting volume to bind to them if asked. | PCGSubsystem.h | |
void RegisterPCGWorldActor
(
APCGWorldActor* InActor |
PCGSubsystem.h | ||
bool RemapPCGComponent
(
const UPCGComponent* OldComponent, |
In case of BP Actors, we need to remap the old component destroyed by the construction script to the new one. | PCGSubsystem.h | |
bool RemoveAndCopyConstructionScriptSourceComponent
(
AActor* InComponentOwner, |
PCGSubsystem.h | ||
void ResetPartitionActorsMap() |
If the partition grid size change, call this to empty the Partition actors map | PCGSubsystem.h | |
FPCGTaskId ScheduleCleanup
(
UPCGComponent* PCGComponent, |
Schedule cleanup(owner->graph). | PCGSubsystem.h | |
FPCGTaskId ScheduleComponent
(
UPCGComponent* PCGComponent, |
Schedule graph(owner->graph) | PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
const FPCGScheduleGenericParams& InParams |
General job scheduling. | PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
TFunction< bool()> InOperation, |
General job scheduling | PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
TFunction< bool()> InOperation, |
General job scheduling | PCGSubsystem.h | |
FPCGTaskId ScheduleGenericWithContext
(
TFunction< bool(FPCGContext*)> InOperation, |
General job scheduling with context | PCGSubsystem.h | |
FPCGTaskId ScheduleGenericWithContext
(
TFunction< bool(FPCGContext*)> InOperation, |
General job scheduling with context | PCGSubsystem.h | |
FPCGTaskId ScheduleGraph
(
const FPCGScheduleGraphParams& InParams |
Schedule graph (used internally for dynamic subgraph execution) | PCGSubsystem.h | |
FPCGTaskId ScheduleGraph
(
UPCGComponent* SourceComponent, |
Schedule graph (used internally for dynamic subgraph execution) | PCGSubsystem.h | |
FPCGTaskId ScheduleGraph
(
UPCGGraph* Graph, |
PCGSubsystem.h | ||
FPCGTaskId ScheduleRefresh
(
UPCGComponent* SourceComponent, |
Schedule refresh on the current or next frame | PCGSubsystem.h | |
void SetConstructionScriptSourceComponent
(
UPCGComponent* InComponent |
PCGSubsystem.h | ||
void UnregisterPartitionActor
(
APCGPartitionActor* InActor |
Unregister a Partition actor, will be removed from the map and remove itself to all intersecting volumes. | PCGSubsystem.h | |
void UnregisterPCGComponent
(
UPCGComponent* InComponent, |
Unregister a PCG Component, will be removed from the octree. | PCGSubsystem.h | |
void UnregisterPCGWorldActor
(
APCGWorldActor* InActor |
PCGSubsystem.h | ||
void UpdateComponentTracking
(
UPCGComponent* InComponent, |
Update the tracking on a given component. | PCGSubsystem.h |
Overridden from UWorldSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitialize() |
PCGSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
PCGSubsystem.h |
Overridden from FTickableGameObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsTickableInEditor() |
PCGSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
PCGSubsystem.h | ||
virtual ETickableTickType GetTickableTickType() |
PCGSubsystem.h | ||
virtual void Tick
(
float DeltaSeconds |
Need UpdateStreamingState? | PCGSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Add UObject references for GC | PCGSubsystem.h | |
static UPCGSubsystem * GetActiveEditorInstance() |
Returns PIE world if it is active, otherwise returns editor world. | PCGSubsystem.h | |
static UPCGSubsystem * GetInstance
(
UWorld* World |
Will return the subsystem from the World if it exists and if it is initialized | PCGSubsystem.h | |
static int32 GetPCGQualityLevel() |
Returns current quality level between Low (0) and Cinematic (4). | PCGSubsystem.h | |
static UPCGSubsystem * GetSubsystemForCurrentWorld() |
To be used when a PCG component can not have a world anymore, to unregister itself. | PCGSubsystem.h | |
static bool IsPartitionActorCreationDisabledForWorld
(
UWorld* InWorld |
PCGSubsystem.h | ||
static void SetDisablePartitionActorCreationForWorld
(
UWorld* InWorld, |
Used by UPCGWorldPartitonBuilder to disable PA creation while outside of a certain scope. | PCGSubsystem.h |