Navigation
API > API/Plugins > API/Plugins/PCG > API/Plugins/PCG/Elements > API/Plugins/PCG/Elements/ControlFlow
Inheritance Hierarchy
- UObject
- UPCGData
- UPCGSettingsInterface
- UPCGSettings
- UPCGSwitchSettings
References
| Module | PCG |
| Header | /Engine/Plugins/PCG/Source/PCG/Public/Elements/ControlFlow/PCGSwitch.h |
| Include | #include "Elements/ControlFlow/PCGSwitch.h" |
Syntax
UCLASS (BlueprintType, ClassGroup=(Procedural), Meta=(Keywords="if multi enum branch"))
class UPCGSwitchSettings : public UPCGSettings
Remarks
Routes data from the input pin, to a specific output pin based on a selection criteria (Int/String/Enum)
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FName > | CachedPinLabels | Cached pin labels for use during the selection process. | |
| FEnumSelector | EnumSelection | Determines which output pin will be selected if the selection mode is Enum. | |
| int32 | IntegerSelection | Determines which output will be selected if the selection mode is Integer. | |
| TArray< int32 > | IntOptions | Determines the available output pin selection options. | |
| EPCGControlFlowSelectionMode | SelectionMode | Determines the type of value to be used to select an output. | |
| TArray< FString > | StringOptions | Determines the available output pin selection options. | |
| FString | StringSelection | Determines which output will be selected if the selection mode is String. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | |||
| int | Returns the index of the currently selected pin. | ||
| bool | GetSelectedPinLabel
(
FName& OutSelectedPinLabel |
Helper function to use the appropriate selection value to determine the current selection. | |
| bool | Switch is dynamic if selection value is overridden / cannot be determined prior to execution. | ||
| bool | IsValuePresent
(
int32 Value |
Returns true if the integer value exists in the user defined options. | |
| bool | IsValuePresent
(
const FString& Value |
Returns true if the string value exists in the user defined options. | |
| bool | IsValuePresent
(
int64 Value |
Returns true if the enum value exists within the selected enum class. |
Overridden from UPCGSettings
| Type | Name | Description | |
|---|---|---|---|
| FPCGElementPtr | |||
| FString | Derived classes can implement this to expose additional information or context, such as an asset in use by the node. | ||
| EPCGChangeType | GetChangeTypeForProperty
(
const FName& InPropertyName |
Gets the change impact for a given property. | |
| FName | |||
| FText | |||
| FText | |||
| EPCGSettingsType | GetType () |
||
| bool | If the node has any dynamic pins that can change based on input or settings | ||
| bool | Display generated title line as primary title (example: BP nodes display the blueprint name as the primary title). | ||
| TArray< FPCGPinProperties > | Returns an array of all the input pin properties. You should not add manually a "params" pin, it is handled automatically by FillOverridableParamsPins. | ||
| bool | IsPinStaticallyActive
(
const FName& OutputPinLabel |
True if we know prior to execution that the given pin will be active (not on inactive branch). | |
| bool | IsPinUsedByNodeExecution
(
const UPCGPin* InPin |
Returns true if InPin is in use by node (assuming node enabled). | |
| 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 | |
| TArray< FPCGPinProperties > | |||
| bool | Whether this node can deactivate its output pins during execution, which can dynamically cull downstream nodes. | ||
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
||
| void | PostLoad () |