Navigation
API > API/Plugins > API/Plugins/PCG
| Name | FPCGContext |
| Type | struct |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/PCGContext.h |
| Include Path | #include "PCGContext.h" |
Syntax
USTRUCT (BlueprintType )
struct FPCGContext
Derived Classes
FPCGContext derived class hierarchy
- FPCGAddComponentContext
- FPCGAppendMeshesFromPointsContext
- FPCGAttributeNoiseContext
- FPCGBlueprintExecutionContext
- FPCGBoundsFromMeshContext
- FPCGCollapseContext
- FPCGCreateCollisionContext
- FPCGDataTableRowToParamDataContext
- FPCGExternalDataContext
- FPCGGenerateGrassMapsContext
- FPCGIndirectionContext
- FPCGLoadObjectsFromPathContext
- FPCGPointFromMeshContext
- FPCGSkinnedMeshSpawnerContext
- FPCGSpawnSplineMeshContext
- FPCGStaticMeshSpawnerContext
- FPCGStaticMeshToDynamicMeshContext
- FPCGSubgraphContext
- FPCGTextureSamplerContext
- FPCGWaitContext
- FPCGWaitLandscapeReadyElementContext
- FPCGWriteToNiagaraDataChannelContext
- TPCGTimeSlicedContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPCGContext
(
FPCGContext&& |
PCGContext.h | ||
FPCGContext
(
const FPCGContext& |
PCGContext.h | ||
PRAGMA_DISABLE_DEPRECATION_WARNINGS FPCGContext () |
Note: We need to explicitly disable warnings on these constructors/operators for clang to be happy with deprecated variables. | PCGContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPCGContext() |
PCGContext.h |
Classes
| Name | Remarks |
|---|---|
| FSharedContext |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncState | FPCGAsyncState | PCGContext.h | ||
| bInputDataModified | bool | Used to track when data transformations (such as CPU readback) occurred on the input data collection as part of the element prepare data. | PCGContext.h | |
| bIsPaused | bool | PCGContext.h | ||
| CachedInputToOutputInternalResults | TArray< TPair< FPCGDataCollection, FPCGDataCollection > > | PCGContext.h | ||
| CompiledTaskId | FPCGTaskId | PCGContext.h | ||
| CurrentPhase | EPCGExecutionPhase | PCGContext.h | ||
| DependenciesCrc | FPCGCrc | PCGContext.h | ||
| DynamicDependencies | TSet< FPCGTaskId > | PCGContext.h | ||
| ExecutionSource | TWeakInterfacePtr< IPCGGraphExecutionSource > | PCGContext.h | ||
| InputData | FPCGDataCollection | PCGContext.h | ||
| Node | const UPCGNode * | TODO: replace this by a better identification mechanism. | PCGContext.h | |
| OutputData | FPCGDataCollection | PCGContext.h | ||
| SourceComponent | TWeakObjectPtr< UPCGComponent > | PCGContext.h | ||
| Stack | const FPCGStack * | PCGContext.h | ||
| TaskId | FPCGTaskId | PCGContext.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AsyncObjects | TSet< TObjectPtr< UObject > > | List of objects created by the PCG Elements, we need to track them so we can remove their Async flags when storing results on main thread so that they can be considered as existing on the main thread (and get properly GCed) | PCGContext.h | |
| bOverrideSettingsOnMainThread | bool | If the settings need to be overridden on the main thread (because we have to load objects) | PCGContext.h | |
| GraphExecutor | TWeakPtr< FPCGGraphExecutor > | Graph Executor that scheduled the task. | PCGContext.h | |
| Handle | TSharedPtr< FPCGContextHandle > | Lazy initialized shared handle pointer that can be used in lambda captures to test if Context is still valid before accessing it. | PCGContext.h | |
| OverriddenParams | TArray< const FPCGSettingsOverridableParam * > | List of params that were in effect overriden. | PCGContext.h | |
| SettingsWithOverride | TObjectPtr< UPCGSettings > | PCGContext.h | ||
| StackHandle | FPCGStackHandle | Handle for the current call stack. | PCGContext.h | |
| Timer | PCGUtils::FCallTime | PCGContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddExtraStructReferencedObjects
(
FReferenceCollector& Collector |
PCGContext.h | ||
void AddStructReferencedObjects
(
FReferenceCollector& Collector |
Gathers references to objects to prevent them from being garbage collected. | PCGContext.h | |
bool CanExecuteOnlyOnMainThread() |
PCGContext.h | ||
void ClearOutputData
(
FPCGTaskId InTaskId |
PCGContext.h | ||
bool ContainsAsyncObject
(
const UObject* InAsyncObject |
PCGContext.h | ||
FString GetComponentName() |
PCGContext.h | ||
FString GetExecutionSourceName() |
PCGContext.h | ||
bool GetFromCache
(
const FPCGGetFromCacheParams& Params, |
PCGContext.h | ||
FPCGTaskId GetGraphExecutionTaskId() |
PCGContext.h | ||
const SettingsType * GetInputSettings () |
Return the settings casted in the wanted type. | PCGContext.h | |
const UPCGSettingsInterface * GetInputSettingsInterface() |
PCGContext.h | ||
TWeakPtr< FPCGContextHandle > GetOrCreateHandle() |
This is not thread safe, make sure it is not called concurrently on the same context. | PCGContext.h | |
const SettingsType * GetOriginalSettings () |
Caution: most use cases should use GetInputSettings, because they contain the overridden values. | PCGContext.h | |
bool GetOutputData
(
FPCGTaskId InTaskId, |
PCGContext.h | ||
int GetSeed() |
Return the seed, possibly overriden by params, and combined with the source component (if any). | PCGContext.h | |
const FPCGStack * GetStack() |
Get the current call stack. | PCGContext.h | |
AActor * GetTargetActor
(
const UPCGSpatialData* InSpatialData |
PCGContext.h | ||
FString GetTaskName() |
PCGContext.h | ||
bool HasVisualLogs() |
True if any issues were logged during last execution. | PCGContext.h | |
void InitFromParams
(
const FPCGInitializeElementParams& InParams |
PCGContext.h | ||
void InitializeSettings
(
bool bSkipPostLoad |
After initializing the context, we can call this method to prepare for parameter override It will create a copy of the original settings if there is indeed a possible override. | PCGContext.h | |
virtual bool IsComputeContext() |
Is this a context for the compute graph element. | PCGContext.h | |
bool IsValueOverriden
(
const FName PropertyName |
Returns true if the given property has been overriden. | PCGContext.h | |
void LogVisual
(
ELogVerbosity::Type InVerbosity, |
Log warnings and errors to be displayed on node in graph editor. | PCGContext.h | |
void OverrideSettings() |
If we any any parameter override, it will read from the params and override matching values in the settings copy. | PCGContext.h | |
FPCGTaskId ScheduleGeneric
(
const FPCGScheduleGenericParams& InParams |
PCGContext.h | ||
FPCGTaskId ScheduleGraph
(
const FPCGScheduleGraphParams& InParams |
PCGContext.h | ||
bool ShouldStop() |
PCGContext.h | ||
void StoreInCache
(
const FPCGStoreInCacheParams& Params, |
PCGContext.h | ||
virtual bool TimeSliceIsEnabled() |
Time slicing is not enabled by default. | PCGContext.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UObject * GetExternalContainerForOverridableParam
(
const FPCGSettingsOverridableParam& InParam |
PCGContext.h | ||
virtual void * GetUnsafeExternalContainerForOverridableParam
(
const FPCGSettingsOverridableParam& InParam |
PCGContext.h | ||
void InitializeGraphExecutor
(
FPCGContext* InContext |
PCGContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static ContextType * GetContextFromHandle
(
TWeakPtr< FPCGContextHandle > WeakHandle |
PCGContext.h | ||
static TSubclassOf< UPCGBasePointData > GetDefaultPointDataClass() |
Like NewPointData_AnyThread, gets the class used for point data depending on the same CVar. | PCGContext.h | |
static bool IsInitializingSettings() |
PCGContext.h | ||
static T * NewObject_AnyThread
(
FPCGContext* Context, |
Allows creating a new object safely inside the execution of a PCG Element, this object will also get tracked properly by the context. | PCGContext.h | |
static UPCGBasePointData * NewPointData_AnyThread
(
FPCGContext* Context |
Temporary so that we can toggle between UPCGPointData and UPCGPointArrayData with a CVar. | PCGContext.h | |
static void Release
(
FPCGContext* InContext |
PCGContext.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPCGContext & operator=
(
const FPCGContext& |
PCGContext.h | ||
FPCGContext & operator=
(
FPCGContext&& |
PCGContext.h |