Navigation
API > API/Plugins > API/Plugins/PCG
The APCGPartitionActor actor is used to store grid cell data and its size will be a multiple of the grid size.
| Name | APCGPartitionActor |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Grid/PCGPartitionActor.h |
| Include Path | #include "Grid/PCGPartitionActor.h" |
Syntax
UCLASS (MinimalAPI, NotBlueprintable, NotPlaceable)
class APCGPartitionActor : public APartitionActor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → APartitionActor → APCGPartitionActor
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
APCGPartitionActor
(
const FObjectInitializer& ObjectInitializer |
Grid/PCGPartitionActor.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| PCGGuid | FGuid | Grid/PCGPartitionActor.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsInvalidForPCG | bool | Flag used to ignore some invalid actors so they don't get registered into the PCG Subsystem | Grid/PCGPartitionActor.h |
|
| bIsRegistered | bool | Tracks the registration status of this PA with the ActorAndComponentMapping system. | Grid/PCGPartitionActor.h | |
| bIsRuntimeGenerated | bool | Tracks if this actor was created by the Runtime Generation system. | Grid/PCGPartitionActor.h | |
| BoundsComponent | TObjectPtr< UBoxComponent > | Box component to draw the Partition actor bounds in the Editor viewport | Grid/PCGPartitionActor.h |
|
| bRequiresUse2DGridFixup | bool | Set from PostLoad so that we can know if this actor needs to update its bUse2DGrid from the old APCGWorldActor::bUse2DGrid flag or not | Grid/PCGPartitionActor.h | |
| bUse2DGrid | bool | Grid/PCGPartitionActor.h |
|
|
| bWasPostCreatedLoaded | bool | Utility bool to check if PostCreation/PostLoad was called. | Grid/PCGPartitionActor.h | |
| LoadedPreviewComponents | TMap< TObjectPtr< UPCGComponent >, TSoftObjectPtr< UPCGComponent > > | PCG components that are cleared when in preview-on-load mode are kept aside and put back when serializing to prevent changes. | Grid/PCGPartitionActor.h |
|
| LocalToOriginal | TMap< TObjectPtr< UPCGComponent >, TSoftObjectPtr< UPCGComponent > > | Grid/PCGPartitionActor.h |
|
|
| OriginalToLocal | TMap< TObjectKey< UPCGComponent >, TObjectPtr< UPCGComponent > > | Note: this map is not a property and not serialized since we will rebuild it from the LocalToOriginal. | Grid/PCGPartitionActor.h | |
| PCGGridSize | uint32 | Grid/PCGPartitionActor.h |
|
|
| RuntimeGridDescriptorHash | uint32 | Grid/PCGPartitionActor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddGraphInstance
(
UPCGComponent* OriginalComponent |
Grid/PCGPartitionActor.h | ||
int64 BP_GetPCGGridSize() |
Grid/PCGPartitionActor.h |
|
|
bool ChangeTransientState
(
UPCGComponent* OriginalComponent, |
Changes transient state for the local component matching the given original component. | Grid/PCGPartitionActor.h | |
void CleanupDeadGraphInstances
(
bool bRemoveNonNullOnly |
Grid/PCGPartitionActor.h | ||
TSet< TObjectPtr< UPCGComponent > > GetAllLocalPCGComponents() |
Return an array of all the PCGComponents on this actor | Grid/PCGPartitionActor.h | |
TSet< TObjectPtr< UPCGComponent > > GetAllOriginalPCGComponents() |
Return a set of all the PCGComponents linked to this actor | Grid/PCGPartitionActor.h | |
FBox GetFixedBounds() |
Grid/PCGPartitionActor.h | ||
FIntVector GetGridCoord() |
Grid/PCGPartitionActor.h | ||
FPCGGridDescriptor GetGridDescriptor() |
Grid/PCGPartitionActor.h | ||
UPCGComponent * GetLocalComponent
(
const UPCGComponent* OriginalComponent |
TODO: Make this in-editor only; during runtime, we should keep a map of component to bounds/volume only and preferably precompute the intersection, so this would make it easier/possible to not have the original actor in game version. | Grid/PCGPartitionActor.h |
|
UPCGComponent * GetOriginalComponent
(
const UPCGComponent* LocalComponent |
Grid/PCGPartitionActor.h |
|
|
uint32 GetPCGGridSize() |
Grid/PCGPartitionActor.h | ||
bool HasGraphInstances() |
Return true if this PA has any graph instances. | Grid/PCGPartitionActor.h | |
bool HasLocalPCGComponents() |
Whether there are any local PCGCompnents on this actor. | Grid/PCGPartitionActor.h | |
bool IsInvalidForPCG() |
Grid/PCGPartitionActor.h | ||
bool IsRuntimeGenerated() |
Grid/PCGPartitionActor.h | ||
bool IsSafeForDeletion() |
[Game thread only] Return if the actor is safe for deletion, meaning no generation is currently running on all original components. | Grid/PCGPartitionActor.h | |
bool IsUsing2DGrid() |
Grid/PCGPartitionActor.h | ||
void PostCreation
(
const FGuid& InGridGUID, |
To be called after the creation of a new actor to set the grid guid and size. | Grid/PCGPartitionActor.h | |
void PostCreation
(
const FPCGGridDescriptor& GridDescriptor |
Grid/PCGPartitionActor.h | ||
void RegisterPCG() |
Register with the PCG Subsystem. | Grid/PCGPartitionActor.h | |
void RemapGraphInstance
(
const UPCGComponent* OldOriginalComponent, |
Grid/PCGPartitionActor.h | ||
bool RemoveGraphInstance
(
UPCGComponent* OriginalComponent |
Grid/PCGPartitionActor.h | ||
void RemoveLocalComponent
(
UPCGComponent* LocalComponent |
When a local component is destroyed. It calls this function. We make sure we don't keep mappings that are dead. | Grid/PCGPartitionActor.h | |
void SetToRuntimeGenerated() |
Marks this PartitionActor as managed by the runtime generation system. | Grid/PCGPartitionActor.h | |
bool Teleport
(
const FVector& NewLocation |
Forces the actor location to change even if its mobility is static. | Grid/PCGPartitionActor.h | |
void UnregisterPCG() |
Unregister with the PCG Subsystem. | Grid/PCGPartitionActor.h | |
void UpdateUse2DGridIfNeeded
(
bool bInUse2DGrid |
Called from PCGActorAndComponentMapping in case we are dealing with an older PCGPartitionActor. | Grid/PCGPartitionActor.h |
Overridden from APartitionActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual uint32 GetDefaultGridSize
(
UWorld* InWorld |
Grid/PCGPartitionActor.h | ||
virtual bool ShouldIncludeGridSizeInLabel() |
Grid/PCGPartitionActor.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginPlay() |
Grid/PCGPartitionActor.h | ||
virtual TUniquePtr< class FWorldPartitionActorDesc > CreateClassActorDesc() |
Grid/PCGPartitionActor.h | ||
virtual void EndPlay
(
const EEndPlayReason::Type EndPlayReason |
Grid/PCGPartitionActor.h | ||
virtual void GetActorBounds
(
bool bOnlyCollidingComponents, |
Grid/PCGPartitionActor.h | ||
virtual AActor * GetSceneOutlinerParent() |
Grid/PCGPartitionActor.h | ||
virtual bool IsSelectable() |
Grid/PCGPartitionActor.h | ||
virtual bool IsUserManaged() |
Grid/PCGPartitionActor.h | ||
virtual void PostRegisterAllComponents() |
Grid/PCGPartitionActor.h | ||
virtual void PostUnregisterAllComponents() |
Grid/PCGPartitionActor.h | ||
virtual bool ShouldExport() |
Grid/PCGPartitionActor.h | ||
virtual bool ShouldImport
(
FStringView ActorPropString, |
Grid/PCGPartitionActor.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy() |
Grid/PCGPartitionActor.h | ||
virtual bool CanEditChange
(
const FProperty* InProperty |
Grid/PCGPartitionActor.h | ||
virtual void PostLoad() |
Grid/PCGPartitionActor.h | ||
virtual void Serialize
(
FArchive& Ar |
Grid/PCGPartitionActor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FString GetPCGPartitionActorName
(
uint32 GridSize, |
Gets the name this partition actor should have. | Grid/PCGPartitionActor.h | |
static FString GetPCGPartitionActorName
(
const FPCGGridDescriptor& GridDescriptor, |
Grid/PCGPartitionActor.h |