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
- FPCGCopyToRenderTargetContext
- FPCGCreateCollisionContext
- FPCGDataTableRowToParamDataContext
- FPCGDataViewToStringExecutionContext
- FPCGExternalDataContext
- FPCGGenerateLandscapeTexturesContext
- FPCGGetTexture2DArrayDataContext
- FPCGIndirectionContext
- FPCGLoadObjectsFromPathContext
- FPCGMeshToDynamicMeshContext
- FPCGPointFromMeshContext
- FPCGSaveDataViewExecutionContext
- FPCGSaveTextureToAssetContext
- FPCGSceneCaptureContext
- FPCGSetMaterialsDynamicMeshContext
- FPCGSkinnedMeshSpawnerContext
- FPCGSpawnSplineMeshContext
- FPCGStaticMeshSpawnerContext
- FPCGSubgraphContext
- FPCGTextureSamplerContext
- FPCGWaitContext
- FPCGWaitLandscapeReadyElementContext
- FPCGWriteToNiagaraDataChannelContext
- TPCGTimeSlicedContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPCGContext
(
FPCGContext&& |
PCGContext.h | ||
FPCGContext
(
const FPCGContext& |
PCGContext.h | ||
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 | ||
| bConvertInputsIfNeededDone | bool | Tracks whether the input conversion step has been done (inside of the PrepareData phase). | 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 | |
| bMustRunOnMainThread | bool | If the element must run on the main thread (like 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 |
|---|---|---|---|
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 | ||
AActor * GetDebugDisplayActor() |
Returns the proper actor to do debug visualization. | PCGContext.h | |
FString GetExecutionSourceName() |
PCGContext.h | ||
UObject * GetExecutionTarget() |
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 | ||
SettingsType * GetMutableInputSettings() |
Return the mutable settings casted in the wanted type. If there is no override, it returns null. | 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 FPCGSourceDataContainer * GetSourceDataContainer () |
PCGContext.h | ||
| PCGContext.h | |||
const FPCGStack * GetStack() |
Get the current call stack. | PCGContext.h | |
AActor * GetTargetActor
(
const UPCGSpatialData* InSpatialData |
Will eventually be deprecated in favor of GetExecutionTarget/GetTypedExecutionTarget. | PCGContext.h | |
FString GetTaskName() |
PCGContext.h | ||
TargetType * GetTypedExecutionTarget() |
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 | |
bool IsCacheEnabled() |
PCGContext.h | ||
bool IsExecutingGraphInspected() |
Whether the graph for the current frame in the execution stack is selected for debugging in the graph editor. | PCGContext.h | |
bool IsValueOverriden
(
const TArrayView< const FName >& PropertyNameChain |
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 | |
void RequestToRunOnMainThread() |
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 |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddExtraStructReferencedObjects
(
FReferenceCollector& Collector |
PCGContext.h | ||
virtual bool IsComputeContext() |
Is this a context for the compute graph element. | PCGContext.h | |
virtual bool TimeSliceIsEnabled() |
Time slicing is not enabled by default. | PCGContext.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TWeakPtr< FPCGGraphExecutor > GetGraphExecutor() |
PCGContext.h | ||
void InitializeGraphExecutor
(
FPCGContext* InContext |
PCGContext.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UObject * GetExternalContainerForOverridableParam
(
const FPCGSettingsOverridableParam& InParam |
PCGContext.h | ||
virtual FStructView GetExternalStructContainerForOverridableParam
(
const FPCGSettingsOverridableParam& InParam |
PCGContext.h | ||
virtual void * GetUnsafeExternalContainerForOverridableParam
(
const FPCGSettingsOverridableParam& InParam |
PCGContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FPCGContext * GetContextForThread () |
Get the context setup for this thread, can be null. | PCGContext.h | |
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 |