Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Sound
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- USoundNode
- USoundNodeRandom
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Classes/Sound/SoundNodeRandom.h |
| Include | #include "Sound/SoundNodeRandom.h" |
Syntax
class USoundNodeRandom : public USoundNode
Remarks
Selects sounds from a random set
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint8: 1 | bRandomizeWithoutReplacement | Determines whether or not this SoundNodeRandom should randomize with or without replacement. | |
| uint8: 1 | bShouldExcludeFromBranchCulling | 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 | |
| uint8: 1 | bSoundCueExcludedFromBranchCulling | Exclusion for branch culling set by the sound cue. | |
| TArray< bool > | HasBeenUsed | Internal state of which sounds have been played. | |
| int32 | NumRandomUsed | Counter var so we don't have to count all of the used sounds each time we choose a sound | |
| TArray< int32 > | PIEHiddenNodes | Editor only list of nodes hidden to duplicate behavior of PreselectAtLevelLoad | |
| int32 | PreselectAtLevelLoad | If greater than 0, then upon each level load such a number of inputs will be randomly selected and the rest will be removed. | |
| TArray< float > | Weights |
Constructors
| Type | Name | Description | |
|---|---|---|---|
USoundNodeRandom
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | ChooseNodeIndex
(
FActiveSound& ActiveSound |
||
| void | |||
| void | |||
| void | ParseNodes
(
FAudioDevice* AudioDevice, |
||
| void |
Overridden from USoundNode
| Type | Name | Description | |
|---|---|---|---|
| void | Editor interface. | ||
| int32 | Returns the maximum number of child nodes this node can possibly have | ||
| int32 | GetNumSounds
(
const UPTRINT NodeWaveInstanceHash, |
Returns the number of simultaneous sounds this node instance plays back. | |
| void | InsertChildNode
(
int32 Index |
||
| void | OnBeginPIE
(
const bool bIsSimulating |
Called as PIE begins | |
| void | RemoveChildNode
(
int32 Index |
||
| void | SetChildNodes
(
TArray< USoundNode* >& InChildNodes |
Ensure Random weights and usage array matches new amount of children |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. |