Navigation
API > API/Plugins > API/Plugins/PCG
| Name | UPCGSubsystem |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Subsystems/PCGSubsystem.h |
| Include Path | #include "Subsystems/PCGSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UPCGSubsystem :
public UTickableWorldSubsystem ,
public IPCGBaseSubsystem
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UPCGSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UPCGSubsystem
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPCGSubsystem() |
Subsystems/PCGSubsystem.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FConstructionScriptSourceComponents | TMap< FName, TObjectKey< UPCGComponent > > | Subsystems/PCGSubsystem.h | |
| FTickAction | TFunction< void()> | Adds an action that will be executed once at the beginning of this subsystem's next Tick(). | Subsystems/PCGSubsystem.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| DisablePartitionActorCreationForWorld | TSet< UWorld * > | Subsystems/PCGSubsystem.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FPCGActorAndComponentMapping | friend | Subsystems/PCGSubsystem.h | ||
| OnComponentGenerationCompleteOrCancelled | FPCGOnComponentGenerationCompleteOrCancelled | Subsystems/PCGSubsystem.h | ||
| OnComponentUnregistered | FPCGOnComponentUnregistered | Subsystems/PCGSubsystem.h | ||
| OnPCGComponentGenerationDone | FPCGOnPCGComponentGenerationDone | Subsystems/PCGSubsystem.h | ||
| OnPCGComponentUnregistered | FPCGOnPCGComponentUnregistered | Subsystems/PCGSubsystem.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActorAndComponentMapping | TUniquePtr< FPCGActorAndComponentMapping > | Subsystems/PCGSubsystem.h | ||
| BeginTickActions | TArray< FTickAction > | Functions will be executed at the beginning of the tick and then removed from this array. | Subsystems/PCGSubsystem.h | |
| bHasTickedOnce | bool | Subsystems/PCGSubsystem.h | ||
| PCGWorldActor | APCGWorldActor * | Subsystems/PCGSubsystem.h | ||
| PCGWorldActorLock | FCriticalSection | Subsystems/PCGSubsystem.h | ||
| PerActorConstructionScriptSourceComponents | TMap< TObjectKey< AActor >, FConstructionScriptSourceComponents > | Subsystems/PCGSubsystem.h | ||
| RuntimeGenScheduler | FPCGRuntimeGenScheduler * | Subsystems/PCGSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BuildLandscapeCache
(
bool bQuiet, |
Builds the landscape data cache. | Subsystems/PCGSubsystem.h | |
void CleanupAllPCGComponents
(
bool bPurge |
Will gather all the components registered, and ask for cleanup. | Subsystems/PCGSubsystem.h | |
void CleanupLocalComponentsImmediate
(
UPCGComponent* InOriginalComponent, |
Immediately cleanup the local components associated with an original component. | Subsystems/PCGSubsystem.h | |
void ClearExecutedStacks
(
const FPCGStack& BeginningWithStack |
Subsystems/PCGSubsystem.h | ||
void ClearExecutedStacks
(
const UPCGGraph* InContainingGraph |
Subsystems/PCGSubsystem.h | ||
void ClearExecutedStacks
(
const UPCGComponent* InRootComponent |
Subsystems/PCGSubsystem.h | ||
void ClearExecutionMetadata
(
UPCGComponent* InComponent |
Subsystems/PCGSubsystem.h | ||
void ClearExecutionMetadata
(
const FPCGStack& BaseStack |
Subsystems/PCGSubsystem.h | ||
void ClearLandscapeCache() |
Clears the landscape data cache | Subsystems/PCGSubsystem.h | |
void ClearPCGLink
(
UPCGComponent* InComponent, |
Move all resources from sub actors to a new actor | Subsystems/PCGSubsystem.h | |
void CreateMissingPartitionActors() |
Subsystems/PCGSubsystem.h | ||
void DeleteSerializedPartitionActors
(
bool bOnlyDeleteUnused, |
Delete serialized partition actors in the level. | Subsystems/PCGSubsystem.h | |
void DestroyAllPCGWorldActors() |
Subsystems/PCGSubsystem.h | ||
void DestroyCurrentPCGWorldActor() |
Subsystems/PCGSubsystem.h | ||
void DirtyGraph
(
UPCGComponent* Component, |
Immediately dirties the partition actors in the given bounds | Subsystems/PCGSubsystem.h | |
APCGPartitionActor * FindOrCreatePCGPartitionActor
(
const FGuid& Guid, |
Subsystems/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. | Subsystems/PCGSubsystem.h | |
APCGWorldActor * FindPCGWorldActor() |
Subsystems/PCGSubsystem.h | ||
void ForAllIntersectingPartitionedComponents
(
const FBoxCenterAndExtent& InBounds, |
Get all components in specified bounds. | Subsystems/PCGSubsystem.h | |
FPCGTaskId ForAllOverlappingCells
(
const FBox& InBounds, |
Call InFunc to all partition grid cells matching 'InGridSizes' and overlapping with 'InBounds'. | Subsystems/PCGSubsystem.h | |
FPCGTaskId ForAllOverlappingCells
(
UPCGComponent* InPCGComponent, |
Subsystems/PCGSubsystem.h | ||
void ForAllOverlappingComponentsInHierarchy
(
UPCGComponent* InComponent, |
Traverses the hierarchy associated with the given component and calls InFunc for each overlapping component. | Subsystems/PCGSubsystem.h | |
void ForAllRegisteredIntersectingLocalComponents
(
UPCGComponent* InOriginalComponent, |
Call the InFunc function to all local component registered to the original component within some bounds. | Subsystems/PCGSubsystem.h | |
void ForAllRegisteredLocalComponents
(
UPCGComponent* InOriginalComponent, |
Call the InFunc function to all local component registered to the original component. Thread safe | Subsystems/PCGSubsystem.h | |
void GenerateAllPCGComponents
(
bool bForce |
Will gather all the components registered, and ask for generate. | Subsystems/PCGSubsystem.h | |
TArray< UPCGComponent * > GetAllIntersectingComponents
(
const FBoxCenterAndExtent& InBounds |
Gather all the PCG components within some bounds. | Subsystems/PCGSubsystem.h | |
TSet< UPCGComponent * > GetAllRegisteredComponents() |
Subsystems/PCGSubsystem.h | ||
TSet< UPCGComponent * > GetAllRegisteredPartitionedComponents() |
Subsystems/PCGSubsystem.h | ||
TArray< FPCGStack > GetExecutedStacks
(
const UPCGComponent* InComponent, |
Subsystems/PCGSubsystem.h | ||
TArray< FPCGStack > GetExecutedStacks
(
const FPCGStack& BeginningWithStack |
Subsystems/PCGSubsystem.h | ||
FPCGGenSourceManager * GetGenSourceManager() |
Subsystems/PCGSubsystem.h | ||
UPCGLandscapeCache * GetLandscapeCache() |
Subsystems/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. | Subsystems/PCGSubsystem.h | |
UPCGComponent * GetLocalComponent
(
uint32 GridSize, |
Subsystems/PCGSubsystem.h | ||
const FPCGNodeVisualLogs & GetNodeVisualLogs() |
Get graph warnings and errors for all nodes. | Subsystems/PCGSubsystem.h | |
FPCGNodeVisualLogs & GetNodeVisualLogsMutable() |
Subsystems/PCGSubsystem.h | ||
TSet< TObjectPtr< APCGPartitionActor > > GetPCGComponentPartitionActorMappings
(
UPCGComponent* InComponent |
Retrieves partition actors for this original component | Subsystems/PCGSubsystem.h | |
APCGWorldActor * GetPCGWorldActor() |
Subsystems/PCGSubsystem.h | ||
APCGPartitionActor * GetRegisteredPCGPartitionActor
(
uint32 GridSize, |
Subsystems/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. | Subsystems/PCGSubsystem.h | |
FPCGRuntimeGenScheduler * GetRuntimeGenScheduler() |
Subsystems/PCGSubsystem.h | ||
void LogAbnormalComponentStates
(
bool bGroupByState |
Subsystems/PCGSubsystem.h | ||
void NotifyLandscapeEditModeExited() |
Notify that we exited the Landscape edit mode. | Subsystems/PCGSubsystem.h | |
void NotifySelectionKeyChanged
(
const FPCGSelectionKey& InSelectionKey, |
Notification that a Selection key needs refreshing | Subsystems/PCGSubsystem.h | |
void OnOriginalComponentRegistered
(
UPCGComponent* InComponent |
Subsystems/PCGSubsystem.h | ||
void OnOriginalComponentUnregistered
(
UPCGComponent* InComponent |
Subsystems/PCGSubsystem.h | ||
void OnPCGQualityLevelChanged() |
Subsystems/PCGSubsystem.h | ||
void PropagateEditingModeToLocalComponents
(
UPCGComponent* InOriginalComponent, |
Propagates transient state change from an original component to the relevant partition actors | Subsystems/PCGSubsystem.h | |
void RefreshAllComponentsFiltered
(
const TFunction< bool(UPCGComponent*)>& ComponentFilter, |
Refresh all components selected by the filter (runtime generated or otherwise). | Subsystems/PCGSubsystem.h | |
void RefreshAllRuntimeGenComponents
(
EPCGChangeType ChangeType |
Asks the runtime generation scheduler to refresh all GenerateAtRuntime components. | Subsystems/PCGSubsystem.h | |
void RefreshRuntimeGenComponent
(
UPCGComponent* RuntimeComponent, |
Asks the runtime generation scheduler to refresh a given GenerateAtRuntime component. | Subsystems/PCGSubsystem.h | |
void RegisterBeginTickAction
(
FTickAction&& Action |
Subsystems/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. | Subsystems/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. | Subsystems/PCGSubsystem.h | |
void RegisterPCGWorldActor
(
APCGWorldActor* InActor |
Subsystems/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. | Subsystems/PCGSubsystem.h | |
bool RemoveAndCopyConstructionScriptSourceComponent
(
AActor* InComponentOwner, |
Subsystems/PCGSubsystem.h | ||
void ResetPartitionActorsMap() |
If the partition grid size change, call this to empty the Partition actors map | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleCleanup
(
UPCGComponent* PCGComponent, |
Schedule cleanup(owner->graph). | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleComponent
(
UPCGComponent* PCGComponent, |
Schedule graph(owner->graph) | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
TFunction< bool()> InOperation, |
General job scheduling | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
TFunction< bool()> InOperation, |
General job scheduling | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGeneric
(
const FPCGScheduleGenericParams& InParams |
General job scheduling. | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGenericWithContext
(
TFunction< bool(FPCGContext*)> InOperation, |
General job scheduling with context | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGenericWithContext
(
TFunction< bool(FPCGContext*)> InOperation, |
General job scheduling with context | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGraph
(
UPCGGraph* Graph, |
Subsystems/PCGSubsystem.h | ||
FPCGTaskId ScheduleGraph
(
const FPCGScheduleGraphParams& InParams |
Schedule graph (used internally for dynamic subgraph execution) | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleGraph
(
UPCGComponent* SourceComponent, |
Schedule graph (used internally for dynamic subgraph execution) | Subsystems/PCGSubsystem.h | |
FPCGTaskId ScheduleRefresh
(
UPCGComponent* SourceComponent, |
Schedule refresh on the current or next frame | Subsystems/PCGSubsystem.h | |
void SetConstructionScriptSourceComponent
(
UPCGComponent* InComponent |
Subsystems/PCGSubsystem.h | ||
void UnregisterPartitionActor
(
APCGPartitionActor* InActor |
Unregister a Partition actor, will be removed from the map and remove itself to all intersecting volumes. | Subsystems/PCGSubsystem.h | |
void UnregisterPCGComponent
(
UPCGComponent* InComponent, |
Unregister a PCG Component, will be removed from the octree. | Subsystems/PCGSubsystem.h | |
void UnregisterPCGWorldActor
(
APCGWorldActor* InActor |
Subsystems/PCGSubsystem.h | ||
void UpdateComponentTracking
(
UPCGComponent* InComponent, |
Update the tracking on a given component. | Subsystems/PCGSubsystem.h |
Overridden from UWorldSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitialize() |
Subsystems/PCGSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
Subsystems/PCGSubsystem.h |
Overridden from FTickableGameObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsTickableInEditor() |
Subsystems/PCGSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
Subsystems/PCGSubsystem.h | ||
virtual ETickableTickType GetTickableTickType() |
Subsystems/PCGSubsystem.h | ||
virtual void Tick
(
float DeltaSeconds |
Need UpdateStreamingState? | Subsystems/PCGSubsystem.h |
Overridden from IPCGBaseSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UWorld * GetSubsystemWorld() |
Subsystems/PCGSubsystem.h |
Protected
Overridden from IPCGBaseSubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CancelGenerationInternal
(
IPCGGraphExecutionSource* Source, |
Subsystems/PCGSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
Add UObject references for GC | Subsystems/PCGSubsystem.h | |
static UPCGSubsystem * GetActiveEditorInstance() |
Returns PIE world if it is active, otherwise returns editor world. | Subsystems/PCGSubsystem.h | |
static UPCGSubsystem * GetInstance
(
UWorld* World |
Will return the subsystem from the World if it exists and if it is initialized | Subsystems/PCGSubsystem.h | |
static int32 GetPCGQualityLevel() |
Returns current quality level between Low (0) and Cinematic (4). | Subsystems/PCGSubsystem.h | |
static UPCGSubsystem * GetSubsystemForCurrentWorld() |
To be used when a PCG component can not have a world anymore, to unregister itself. | Subsystems/PCGSubsystem.h | |
static bool IsPartitionActorCreationDisabledForWorld
(
UWorld* InWorld |
Subsystems/PCGSubsystem.h | ||
static void SetDisablePartitionActorCreationForWorld
(
UWorld* InWorld, |
Used by UPCGWorldPartitonBuilder to disable PA creation while outside of a certain scope. | Subsystems/PCGSubsystem.h |