Navigation
API > API/Plugins > API/Plugins/PCG
Chooses entries randomly through ratio or a fixed number of entries. Chosen/Discarded entries will be in the same order than they appear in the input data.
| Name | UPCGRandomChoiceSettings |
| Type | class |
| Header File | /Engine/Plugins/PCG/Source/PCG/Public/Elements/PCGRandomChoice.h |
| Include Path | #include "Elements/PCGRandomChoice.h" |
Syntax
UCLASS (BlueprintType)
class UPCGRandomChoiceSettings : public UPCGSettings
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPCGData → UPCGSettingsInterface → UPCGSettings → UPCGRandomChoiceSettings
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bFixedMode | bool | Either choose a fixed number of entries, or a ratio of entries. | Elements/PCGRandomChoice.h |
|
| bHasCustomSeedSource | bool | Use an attribute as a source for generating the seed, i.e. similar to or replacing the $Seed property on points. | Elements/PCGRandomChoice.h |
|
| bOutputDiscardedEntries | bool | By default, we output discarded entries. If you don't need them, disable this option. | Elements/PCGRandomChoice.h |
|
| bUseFirstAttributeOnly | bool | Controls whether only the first element's attribute will be used to generate the selection seed. | Elements/PCGRandomChoice.h |
|
| CustomSeedSource | FPCGAttributePropertyInputSelector | Attribute to generate the selection seed from. | Elements/PCGRandomChoice.h |
|
| FixedNumber | int | Defines the number of entries to keep. | Elements/PCGRandomChoice.h |
|
| Ratio | float | Defines the ratio of entries to keep. | Elements/PCGRandomChoice.h |
|
Functions
Public
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FName GetDefaultNodeName() |
Elements/PCGRandomChoice.h | ||
virtual FText GetDefaultNodeTitle() |
Elements/PCGRandomChoice.h | ||
virtual FText GetNodeTooltipText() |
Elements/PCGRandomChoice.h | ||
virtual EPCGSettingsType GetType() |
Elements/PCGRandomChoice.h | ||
virtual bool HasDynamicPins() |
If the node has any dynamic pins that can change based on input or settings | Elements/PCGRandomChoice.h | |
virtual bool UseSeed () |
By default, settings do not use a seed. | Elements/PCGRandomChoice.h |
Protected
Overridden from UPCGSettings
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FPCGElementPtr CreateElement() |
Elements/PCGRandomChoice.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/PCGRandomChoice.h | |
virtual TArray< FPCGPinProperties > OutputPinProperties() |
Elements/PCGRandomChoice.h |