Navigation
API > API/Plugins > API/Plugins/PCG
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UPCGComponent
References
| Module | PCG |
| Header | /Engine/Plugins/Experimental/PCG/Source/PCG/Public/PCGComponent.h |
| Include | #include "PCGComponent.h" |
Syntax
UCLASS&40;BlueprintType, ClassGroup&61;&40;Procedural&41;,
Meta&61;&40;BlueprintSpawnableComponent, prioritizeCategories&61;"PCG"&41;&41;
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 | bIsComponentPartitioned | In World Partition map, will partition the component in a grid, according to PCGWorldActor settings, dispatching the generation to multiple local components. | |
| bool | bParseActorComponents | ||
| bool | bRegenerateInEditor | ||
| bool | bRuntimeGenerated | ||
| PCGUtils::FExtraCapture | ExtraCapture | ||
| uint32 | GenerationGridSize | ||
| EPCGComponentGenerationTrigger | GenerationTrigger | ||
| TObjectPtr< UPCGGraphInstance > | GraphInstance | ||
| EPCGComponentInput | InputType | ||
| FOnPCGGraphCleaned | OnPCGGraphCleanedDelegate | ||
| FOnPCGGraphGenerated | OnPCGGraphGeneratedDelegate | ||
| TArray< FName > | PostGenerateFunctionNames | Can specify a list of functions from the owner of this component to be called when generation is done, in order. | |
| int | Seed |
Constructors
No constructors are accessible with public or protected access.
Destructors
No destructors are accessible with public or protected access.
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddToManagedResources
(
UPCGManagedResource* InResource |
Registers some managed resource to the current component | |
| void | Cancels in-progress generation | ||
| bool | CanPartition () |
||
| void | Cleanup
(
bool bRemoveComponents, |
Networked cleanup call | |
| void | Cleanup () |
||
| 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. All is done immediately. | |
| 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 | 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
(
bool bForce |
Starts generation from a local (vs. remote) standpoint. Will not be replicated. Will be delayed. | |
| FPCGTaskId | GenerateLocalGetTaskId
(
bool bForce |
||
| UPCGData * | |||
| const FPCGDataCollection & | Retrieves generated data | ||
| EPCGHiGenGrid | |||
| uint32 | |||
| FPCGTaskId | Returns task ids to do internal chaining | ||
| UPCGGraph * | GetGraph () |
||
| UPCGGraphInstance * | |||
| FBox | |||
| UPCGData * | |||
| const FPCGDataCollection * | GetInspectionData
(
const FPCGStack& InStack |
||
| UPCGData * | |||
| UPCGData * | |||
| FBox | |||
| UPCGData * | |||
| UPCGComponent * | If this is a local component returns self, otherwise returns the original component. | ||
| UPCGData * | GetPCGData () |
||
| UPCGSubsystem * | GetSubsystem () |
||
| bool | IsActorTracked
(
AActor* InActor, |
||
| bool | IsCleaningUp () |
||
| bool | IsGenerating () |
Return if we are currently generating the graph for this component | |
| bool | |||
| bool | IsInspecting () |
Functions for managing the node inspection cache | |
| bool | |||
| bool | |||
| void | Responsibility of the PCG Partition Actor to mark is local | ||
| void | Notify properties changed, used in runtime cases, will dirty & trigger a regeneration if needed | ||
| void | OnRefresh
(
bool bForceRefresh |
||
| void | Refresh
(
bool bStructural |
||
| 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 | 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 | |
| bool | Know if we need to force a generation, in case of BP added to the world in editor | ||
| void | |||
| void | |||
| void | StoreInspectionData
(
const FPCGStack* InStack, |
||
| void | StoreOutputDataForPin
(
const FString& InResourceKey, |
Store data with a resource key that identifies the pin. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | BeginPlay () |
~End UObject interface | |
| void | EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Ends gameplay for this component. | |
| TStructOnScope< FActorComponentInstanceData > | Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation | ||
| void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | |
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| bool | CanEditChange
(
const FProperty* InProperty |
Called by the editor to query whether a property of this object is allowed to be modified. | |
| void | Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization | ||
| void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | ||
| void | PostLoad () |
~Begin UObject interface |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UPCGGraph > | Graph_DEPRECATED |