Navigation
API > API/Plugins > API/Plugins/PCG
Inheritance Hierarchy
- UActorComponent
- UPCGComponent
References
| Module | PCG |
| Header | /Engine/Plugins/PCG/Source/PCG/Public/PCGComponent.h |
| Include | #include "PCGComponent.h" |
Syntax
UCLASS (BlueprintType, ClassGroup=(Procedural),
Meta=(BlueprintSpawnableComponent, prioritizeCategories="PCG"))
class UPCGComponent : public UActorComponent
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bActivated | ||
| bool | bDirtyGenerated | ||
| bool | bForceGenerateOnBPAddedToWorld | Property that will automatically be set on BP templates, to allow for "Generate on add to world" in editor. | |
| bool | bGenerated | Flag to indicate whether this component has run in the editor. | |
| bool | bGenerateOnDropWhenTriggerOnDemand | When Generation Trigger is OnDemand, we can still force the component to generate on drop. | |
| bool | bIsComponentPartitioned | Will partition the component in a grid, dispatching the generation to multiple local components. | |
| bool | bOnlyTrackItself | Even if the graph has external dependencies, the component won't react to them. | |
| bool | bOverrideGenerationRadii | Manual overrides for the graph generation radii and cleanup radius multiplier. | |
| bool | bParseActorComponents | ||
| bool | bRegenerateInEditor | ||
| bool | bRuntimeGenerated | ||
| EPCGEditorDirtyMode | CurrentEditingMode | Current editing mode that depends on the serialized editing mode and loading. | |
| PCGUtils::FExtraCapture | ExtraCapture | ||
| uint32 | GenerationGridSize | ||
| FPCGRuntimeGenerationRadii | GenerationRadii | ||
| EPCGComponentGenerationTrigger | GenerationTrigger | ||
| TObjectPtr< UPCGGraphInstance > | GraphInstance | ||
| EPCGComponentInput | InputType | ||
| FOnPCGGraphCancelled | OnPCGGraphCancelledDelegate | ||
| FOnPCGGraphCancelledExternal | OnPCGGraphCancelledExternal | Event dispatched when a graph cancels generation on this component. | |
| FOnPCGGraphCleaned | OnPCGGraphCleanedDelegate | ||
| FOnPCGGraphCleanedExternal | OnPCGGraphCleanedExternal | Event dispatched when a graph cleans on this component. | |
| FOnPCGGraphGenerated | OnPCGGraphGeneratedDelegate | ||
| FOnPCGGraphGeneratedExternal | OnPCGGraphGeneratedExternal | Event dispatched when a graph completes its generation on this component. | |
| FOnPCGGraphStartGenerating | OnPCGGraphStartGeneratingDelegate | ||
| FOnPCGGraphStartGeneratingExternal | OnPCGGraphStartGeneratingExternal | Event dispatched when a graph begins generation on this component. | |
| TArray< FName > | PostGenerateFunctionNames | Can specify a list of functions from the owner of this component to be called when generation is done, in order. | |
| EPCGEditorDirtyMode | PreviousEditingMode | Used to store the CurrentEditingMode when it is forcefully changed by another system, such as runtime generation. | |
| TObjectPtr< UPCGSchedulingPolicyBase > | SchedulingPolicy | This is the instanced UPCGSchedulingPolicy object which holds scheduling parameters and calculates priorities. | |
| TSubclassOf< UPCGSchedulingPolicyBase > | SchedulingPolicyClass | A Scheduling Policy dictates the order in which instances of this component will be scheduled. | |
| int | Seed | ||
| EPCGEditorDirtyMode | SerializedEditingMode |
Constructors
No constructors are accessible with public or protected access.
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddToManagedResources
(
UPCGManagedResource* InResource |
Registers some managed resource to the current component | |
| void | BeginDestroy () |
||
| void | BeginPlay () |
~End UObject interface | |
| void | Cancels in-progress generation | ||
| bool | CanEditChange
(
const FProperty* InProperty |
||
| bool | CanPartition () |
||
| void | ChangeTransientState
(
EPCGEditorDirtyMode NewEditingMode |
Changes the transient state (preview, normal, load on preview) - public only because it needs to be accessed by APCGPartitionActor | |
| void | Cleanup () |
||
| void | Cleanup
(
bool bRemoveComponents, |
Networked cleanup call | |
| void | CleanupLocal
(
bool bRemoveComponents, |
Cleans up the generation from a local (vs. remote) standpoint. | |
| void | CleanupLocalImmediate
(
bool bRemoveComponents, |
Same as CleanupLocal, but without any delayed tasks. | |
| void | ClearInspectionData
(
bool bClearPerNodeExecutionData |
||
| AActor * | ClearPCGLink
(
UClass* TemplateActor |
Move all generated resources under a new actor, following a template (AActor if not provided), clearing all link to this PCG component. | |
| void | Clear any data stored for any pins. | ||
| UPCGData * | CreateActorPCGData
(
AActor* Actor, |
Builds the canonical PCG data from a given actor and its PCG component if any. | |
| FPCGDataCollection | CreateActorPCGDataCollection
(
AActor* Actor, |
Builds the PCG data from a given actor and its PCG component, and places it in a data collection with appropriate tags | |
| void |
DirtyGenerated
(
EPCGComponentDirtyFlag DataToDirtyFlag, |
Dirty generated data depending on the flag. | |
| void | |||
| void | |||
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
||
| void | ForEachManagedResource
(
TFunctionRef< void(UPCGManagedResource*)> InFunction |
||
| void | Generate () |
Transactionable methods to be called from details UI | |
| void | Generate
(
bool bForce |
Networked generation call that also activates the component as needed | |
| void | GenerateLocal
(
EPCGComponentGenerationTrigger RequestedGenerationTrigger, |
Requests the component to generate only on the specified grid level (all grid levels if EPCGHiGenGrid::Uninitialized). | |
| void | GenerateLocal
(
bool bForce |
Starts generation from a local (vs. remote) standpoint. Will not be replicated. Will be delayed. | |
| FPCGTaskId | GenerateLocalGetTaskId
(
bool bForce |
||
| FPCGTaskId | GenerateLocalGetTaskId
(
EPCGComponentGenerationTrigger RequestedGenerationTrigger, |
||
| UPCGData * | |||
| double | GetCleanupRadiusFromGrid
(
EPCGHiGenGrid Grid |
Compute the runtime cleanup radius for the given grid size. | |
| TStructOnScope< FActorComponentInstanceData > | |||
| EPCGEditorDirtyMode | Returns the current editing mode | ||
| TMap< TObjectKey< const UPCGNode >, TSet< FPCGStack > > | Retrieves the executed nodes information | ||
| const FPCGDataCollection & | Retrieves generated data | ||
| EPCGHiGenGrid | |||
| uint32 | |||
| double | GetGenerationRadiusFromGrid
(
EPCGHiGenGrid Grid |
Get the runtime generation radius for the given grid size. | |
| FPCGTaskId | Returns task ids to do internal chaining | ||
| UPCGGraph * | GetGraph () |
||
| UPCGGraphInstance * | |||
| FBox | |||
| UPCGData * | |||
| const FPCGDataCollection * | GetInspectionData
(
const FPCGStack& InStack |
||
| UPCGData * | |||
| UPCGData * | |||
| FBox | |||
| uint64 | GetNodeInactivePinMask
(
const UPCGNode* InNode, |
Retrieve the inactive pin bitmask for the given node and stack in the last execution. | |
| UPCGData * | |||
| UPCGComponent * | If this is a local component returns self, otherwise returns the original component. | ||
| UPCGData * | GetPCGData () |
||
| UPCGSchedulingPolicyBase * | |||
| EPCGEditorDirtyMode | |||
| bool | GetStackContext
(
FPCGStackContext& OutStackContext |
Get execution stack information. | |
| UPCGSubsystem * | GetSubsystem () |
||
| bool | HasNodeProducedData
(
const UPCGNode* InNode, |
Did the given node produce one or more data items in the given stack during the last execution. | |
| bool | IsCleaningUp () |
||
| bool | IsEditorOnly () |
||
| bool | IsGenerating () |
Return if we are currently generating the graph for this component | |
| bool | |||
| bool | IsIgnoringChangeOrigin
(
UObject* InChangeOrigin |
||
| bool | Returns whether the component (or resources) should be marked as dirty following interaction/refresh based on the current editing mode | ||
| bool | IsInspecting () |
Functions for managing the node inspection cache | |
| bool | |||
| bool | Returns true if the component is managed by the runtime generation system. | ||
| bool | IsObjectTracked
(
const UObject* InObject, |
||
| bool | |||
| bool | Returns current refresh task ID. | ||
| void | Responsibility of the PCG Partition Actor to mark is local | ||
| void | NotifyNodeDynamicInactivePins
(
const UPCGNode* InNode, |
Whether the given node was culled by a dynamic branch in the given stack. | |
| void | NotifyNodeExecuted
(
const UPCGNode* InNode, |
Called at execution time each time a node has been executed. | |
| void | Notify properties changed, used in runtime cases, will dirty & trigger a regeneration if needed | ||
| void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
||
| void | OnRefresh
(
bool bForceRefresh |
||
| void | OnRegister () |
||
| void | OnUnregister () |
||
| void | |||
| void | |||
| void | PostLoad () |
||
| void | Refresh
(
EPCGChangeType ChangeType, |
Schedules refresh of the component. | |
| void | |||
| void | RegisterDynamicTracking
(
const UPCGSettings* InSettings, |
To be called by an element to notify the component that this settings have a dynamic dependency. | |
| void | ResetIgnoredChangeOrigins
(
bool bLogIfAnyPresent |
||
| void | Reset last generated bounds to force PCGPartitionActor creation on next refresh | ||
| const FPCGDataCollection * | RetrieveOutputDataForPin
(
const FString& InResourceKey |
Lookup data using a resource key that identifies the pin. | |
| void | Serialize
(
FArchive& Ar |
~Begin UObject interface | |
| void | SetEditingMode
(
EPCGEditorDirtyMode InEditingMode, |
||
| void | SetGenerationGridSize
(
uint32 InGenerationGridSize |
||
| void | SetGraph
(
UPCGGraphInterface* InGraph |
||
| void | SetGraphLocal
(
UPCGGraphInterface* InGraph |
||
| void | SetIsPartitioned
(
bool bIsNowPartitioned |
Utility function (mostly for tests) to properly set the value of bIsComponentPartitioned. | |
| void | SetPropertiesFromOriginal
(
const UPCGComponent* Original |
Updates internal properties from other component, dirties as required but does not trigger Refresh | |
| void | SetSchedulingPolicyClass
(
TSubclassOf< UPCGSchedulingPolicyBase > InSchedulingPolicyClass |
Set the runtime generation scheduling policy type. | |
| bool | Know if we need to force a generation, in case of BP added to the world in editor | ||
| void | |||
| void | StartIgnoringChangeOriginDuringGeneration
(
UObject* InChangeOriginToIgnore |
For duration of the current/next generation, any change triggers from this change origin will be discarded. | |
| void | |||
| void | StopIgnoringChangeOriginDuringGeneration
(
UObject* InChangeOriginToIgnore |
||
| void | StoreInspectionData
(
const FPCGStack* InStack, |
||
| void | StoreOutputDataForPin
(
const FString& InResourceKey, |
Store data with a resource key that identifies the pin. | |
| bool | WasNodeExecuted
(
const UPCGNode* InNode, |
Whether a task for the given node and stack was executed during the last execution. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UPCGGraph > | Graph_DEPRECATED |