Navigation
API > API/Runtime > API/Runtime/Engine
Selects sounds from a random set
| Name | USoundNodeRandom |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Sound/SoundNodeRandom.h |
| Include Path | #include "Sound/SoundNodeRandom.h" |
Syntax
UCLASS (HideCategories=Object, EditInlineNew, MinimalAPI, Meta=(DisplayName="Random"))
class USoundNodeRandom : public USoundNode
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → USoundNode → USoundNodeRandom
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USoundNodeRandom
(
const FObjectInitializer& ObjectInitializer |
Sound/SoundNodeRandom.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bRandomizeWithoutReplacement | uint8 | Determines whether or not this SoundNodeRandom should randomize with or without replacement. | Sound/SoundNodeRandom.h |
|
| bShouldExcludeFromBranchCulling | uint8 | If set to true, this random node will not be culled on load for platforms with a maximum amount of preloaded random branches set in project settings | Sound/SoundNodeRandom.h |
|
| bSoundCueExcludedFromBranchCulling | uint8 | Exclusion for branch culling set by the sound cue. | Sound/SoundNodeRandom.h | |
| HasBeenUsed | TArray< bool > | Internal state of which sounds have been played. | Sound/SoundNodeRandom.h |
|
| NumRandomUsed | int32 | Counter var so we don't have to count all of the used sounds each time we choose a sound | Sound/SoundNodeRandom.h |
|
| PIEHiddenNodes | TArray< int32 > | Editor only list of nodes hidden to duplicate behavior of PreselectAtLevelLoad | Sound/SoundNodeRandom.h |
|
| PreselectAtLevelLoad | int32 | If greater than 0, then upon each level load such a number of inputs will be randomly selected and the rest will be removed. | Sound/SoundNodeRandom.h |
|
| Weights | TArray< float > | Sound/SoundNodeRandom.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 ChooseNodeIndex
(
FActiveSound& ActiveSound |
Sound/SoundNodeRandom.h | ||
void FixHasBeenUsedArray() |
Sound/SoundNodeRandom.h | ||
void FixWeightsArray() |
Sound/SoundNodeRandom.h | ||
virtual void ParseNodes
(
FAudioDevice* AudioDevice, |
Sound/SoundNodeRandom.h | ||
void UpdatePIEHiddenNodes() |
Sound/SoundNodeRandom.h |
Overridden from USoundNode
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CreateStartingConnectors () |
Editor interface. | Sound/SoundNodeRandom.h | |
virtual int32 GetMaxChildNodes() |
Returns the maximum number of child nodes this node can possibly have | Sound/SoundNodeRandom.h | |
virtual int32 GetNumSounds
(
const UPTRINT NodeWaveInstanceHash, |
Returns the number of simultaneous sounds this node instance plays back. | Sound/SoundNodeRandom.h | |
virtual void InsertChildNode
(
int32 Index |
Sound/SoundNodeRandom.h | ||
virtual void OnBeginPIE
(
const bool bIsSimulating |
Called as PIE begins | Sound/SoundNodeRandom.h | |
virtual void RemoveChildNode
(
int32 Index |
Sound/SoundNodeRandom.h | ||
virtual void SetChildNodes
(
TArray< USoundNode* >& InChildNodes |
Ensure Random weights and usage array matches new amount of children | Sound/SoundNodeRandom.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostEditImport() |
Sound/SoundNodeRandom.h | ||
virtual void PostLoad() |
Sound/SoundNodeRandom.h |