USoundNodeRandom

Selects sounds from a random set

Windows
MacOS
Linux

Inheritance Hierarchy

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

Name Description

Public variable

uint8: 1

 

bRandomizeWithoutReplacement

Determines whether or not this SoundNodeRandom should randomize with or without replacement.

Public variable

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

Public variable

uint8: 1

 

bSoundCueExcludedFromBranchCulling

Exclusion for branch culling set by the sound cue.

Public variable

TArray< bool >

 

HasBeenUsed

Internal state of which sounds have been played.

Public variable

int32

 

NumRandomUsed

Counter var so we don't have to count all of the used sounds each time we choose a sound

Public variable

TArray< int32 >

 

PIEHiddenNodes

Editor only list of nodes hidden to duplicate behavior of PreselectAtLevelLoad

Public variable

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.

Public variable

TArray< float >

 

Weights

Constructors

Name Description

Public function

USoundNodeRandom

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

int32

 

ChooseNodeIndex

(
    FActiveSound& ActiveSound
)

Public function

void

 

FixHasBeenUsedArray()

Public function

void

 

FixWeightsArray()

Public function Virtual

void

 

ParseNodes

(
    FAudioDevice* AudioDevice,
    const UPTRINT NodeWaveInstanceHash,
    FActiveSound& ActiveSound,
    const FSoundParseParameters& Parse...,
    TArray< FWaveInstance* >& Wav...
)

Public function

void

 

UpdatePIEHiddenNodes()

Overridden from USoundNode

Name Description

Public function Virtual

void

 

CreateStartingConnectors()

Editor interface.

Public function Virtual Const

int32

 

GetMaxChildNodes()

Returns the maximum number of child nodes this node can possibly have

Public function Virtual Const

int32

 

GetNumSounds

(
    const UPTRINT NodeWaveInstanceHash,
    FActiveSound& ActiveSound
)

Returns the number of simultaneous sounds this node instance plays back.

Public function Virtual

void

 

InsertChildNode

(
    int32 Index
)

Public function Virtual

void

 

OnBeginPIE

(
    const bool bIsSimulating
)

Called as PIE begins

Public function Virtual

void

 

RemoveChildNode

(
    int32 Index
)

Public function Virtual

void

 

SetChildNodes

(
    TArray< USoundNode* >& InChil...
)

Ensure Random weights and usage array matches new amount of children

Overridden from UObject

Name Description

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss