Navigation
API > API/Plugins > API/Plugins/PCG
Routes data from the input pin, to a specific output pin based on a selection criteria (Int/String/Enum)
| Name | UPCGSwitchSettings |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Elements/ControlFlow/PCGSwitch.h |
| Include Path | #include "Elements/ControlFlow/PCGSwitch.h" |
Syntax
UCLASS (BlueprintType, ClassGroup=(Procedural), Meta=(Keywords="if multi enum branch"))
class UPCGSwitchSettings : public UPCGControlFlowSettings
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGData → UPCGSettingsInterface → UPCGSettings → UPCGControlFlowSettings → UPCGSwitchSettings
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CachedPinLabels | TArray< FName > | Cached pin labels for use during the selection process. | Elements/ControlFlow/PCGSwitch.h |
|
| EnumSelection | FEnumSelector | Determines which output pin will be selected if the selection mode is Enum. | Elements/ControlFlow/PCGSwitch.h |
|
| EnumValueToPinLabelMapping | TMap< int64, FName > | Since we use the Display name as the output pins for enums, this can be different in non-editor build. | Elements/ControlFlow/PCGSwitch.h | |
| IntegerSelection | int32 | Determines which output will be selected if the selection mode is Integer. | Elements/ControlFlow/PCGSwitch.h |
|
| IntOptions | TArray< int32 > | Determines the available output pin selection options. | Elements/ControlFlow/PCGSwitch.h |
|
| SelectionMode | EPCGControlFlowSelectionMode | Determines the type of value to be used to select an output. | Elements/ControlFlow/PCGSwitch.h |
|
| StringOptions | TArray< FString > | Determines the available output pin selection options. | Elements/ControlFlow/PCGSwitch.h |
|
| StringSelection | FString | Determines which output will be selected if the selection mode is String. | Elements/ControlFlow/PCGSwitch.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FPCGSwitchElement | friend | Elements/ControlFlow/PCGSwitch.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void UpdateSettings() |
To be called after the settings are modified directly in native code. | Elements/ControlFlow/PCGSwitch.h |
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FString GetAdditionalTitleInformation() |
Derived classes can implement this to expose additional information or context, such as an asset in use by the node. | Elements/ControlFlow/PCGSwitch.h | |
virtual FName GetDefaultNodeName() |
Elements/ControlFlow/PCGSwitch.h | ||
virtual FText GetDefaultNodeTitle() |
Elements/ControlFlow/PCGSwitch.h | ||
virtual FText GetNodeTooltipText() |
Elements/ControlFlow/PCGSwitch.h | ||
virtual EPCGSettingsType GetType() |
Elements/ControlFlow/PCGSwitch.h | ||
virtual bool HasDynamicPins() |
If the node has any dynamic pins that can change based on input or settings | Elements/ControlFlow/PCGSwitch.h | |
virtual bool HasFlippedTitleLines() |
Display generated title line as primary title (example: BP nodes display the blueprint name as the primary title). | Elements/ControlFlow/PCGSwitch.h | |
virtual bool IsPinStaticallyActive
(
const FName& OutputPinLabel |
True if we know prior to execution that the given pin will be active (not on inactive branch). | Elements/ControlFlow/PCGSwitch.h | |
virtual bool IsPinUsedByNodeExecution
(
const UPCGPin* InPin |
Returns true if InPin is in use by node (assuming node enabled). | Elements/ControlFlow/PCGSwitch.h | |
virtual bool OutputPinsCanBeDeactivated() |
Whether this node can deactivate its output pins during execution, which can dynamically cull downstream nodes. | Elements/ControlFlow/PCGSwitch.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Elements/ControlFlow/PCGSwitch.h | ||
virtual void PostLoad() |
Elements/ControlFlow/PCGSwitch.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CacheEnumValueToPinLabelsMapping() |
Elements/ControlFlow/PCGSwitch.h | ||
void CachePinLabels() |
Elements/ControlFlow/PCGSwitch.h | ||
int GetSelectedOutputPinIndex() |
Returns the index of the currently selected pin. | Elements/ControlFlow/PCGSwitch.h | |
bool GetSelectedPinLabel
(
FName& OutSelectedPinLabel |
Helper function to use the appropriate selection value to determine the current selection. | Elements/ControlFlow/PCGSwitch.h | |
virtual bool IsSwitchDynamic() |
Switch is dynamic if selection value is overridden / cannot be determined prior to execution. | Elements/ControlFlow/PCGSwitch.h | |
bool IsValuePresent
(
int32 Value |
Returns true if the integer value exists in the user defined options. | Elements/ControlFlow/PCGSwitch.h | |
bool IsValuePresent
(
const FString& Value |
Returns true if the string value exists in the user defined options. | Elements/ControlFlow/PCGSwitch.h | |
bool IsValuePresent
(
int64 Value |
Returns true if the enum value exists within the selected enum class. | Elements/ControlFlow/PCGSwitch.h |
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPCGElementPtr CreateElement() |
Elements/ControlFlow/PCGSwitch.h | ||
virtual EPCGChangeType GetChangeTypeForProperty
(
const FName& InPropertyName |
Gets the change impact for a given property. | Elements/ControlFlow/PCGSwitch.h | |
virtual TArray< FPCGPinProperties > InputPinProperties() |
Returns an array of all the input pin properties. You should not add manually a "params" pin, it is handled automatically by FillOverridableParamsPins. | Elements/ControlFlow/PCGSwitch.h | |
virtual void OnOverrideSettingsDuplicatedInternal
(
bool bSkippedPostLoad |
Can be overriden by child class if some fixup code needs to run after duplication in the context of FPCGContext::InitializeSettings | Elements/ControlFlow/PCGSwitch.h | |
virtual TArray< FPCGPinProperties > OutputPinProperties() |
Elements/ControlFlow/PCGSwitch.h |