UNiagaraDataInterfaceAudioPlayer

This Data Interface can be used to play one-shot audio effects driven by particle data.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Niagara

Header

/Engine/Plugins/FX/Niagara/Source/Niagara/Classes/NiagaraDataInterfaceAudioPlayer.h

Include

#include "NiagaraDataInterfaceAudioPlayer.h"

Syntax

UCLASS(EditInlineNew, Category="Audio", Meta=(DisplayName="Audio Player"))
class UNiagaraDataInterfaceAudioPlayer : public UNiagaraDataInterface

Remarks

This Data Interface can be used to play one-shot audio effects driven by particle data.

Variables

Name Description

Public variable UProperty Category, EditAnywhere

TObjectPtr< USo...

 

Attenuation

Optional sound attenuation setting to use

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

bool

 

bLimitPlaysPerTick

Public variable UProperty Category, EditAnywhere, AdvancedDisplay

bool

 

bOnlyActiveDuringGameplay

If true then this data interface only processes sounds during active gameplay.

Public variable UProperty Category, EditAnywhere, AdvancedDisplay

bool

 

bStopWhenComponentIsDestroyed

If false then it the audio component keeps playing after the niagara component was destroyed.

Public variable UProperty Category, EditAnywhere

TObjectPtr< USo...

 

Concurrency

Optional sound concurrency setting to use

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Meta

int32

 

MaxPlaysPerTick

This sets the max number of sounds played each tick.

Public variable UProperty Category, EditAnywhere

TArray< FName >

 

ParameterNames

A set of parameter names that can be referenced via index when setting sound cue parameters on persistent audio

Public variable UProperty Category, EditAnywhere

TObjectPtr< USo...

 

SoundToPlay

Reference to the audio asset to play

Constructors

Name Description

Public function

UNiagaraDataInterfaceAudioPlayer

(
    const FObjectInitializer& ObjectIn...
)

Functions

Overridden from UNiagaraDataInterface

Name Description

Public function Virtual Const

bool

 

CanExecuteOnTarget

(
    ENiagaraSimTarget Target
)

Protected function Virtual Const

bool

 

CopyToInternal

(
    UNiagaraDataInterface* Destina...
)

Public function Virtual

void

 

DestroyPerInstanceData

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...
)

Destroys the per instance data for this interface.

Public function Virtual Const

bool

 

Equals

(
    const UNiagaraDataInterface* O...
)

Determines if this DataInterface is the same as another.

Public function Virtual

void

 

GetFunctions

Gets all the available functions for this data interface.

Public function Virtual

void

 

GetVMExternalFunction

(
    const FVMExternalFunctionBindingInf...,
    void* InstanceData,
    FVMExternalFunction& OutFunc
)

Returns the delegate for the passed function signature.

Public function Virtual Const

bool

 

HasPostSimulateTick()

Public function Virtual Const

bool

 

HasPreSimulateTick()

Public function Virtual

bool

 

InitPerInstanceData

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...
)

Initializes the per instance data for this interface.

Public function Virtual Const

int32

 

PerInstanceDataSize()

Returns the size of the per instance data for this interface.

Public function Virtual

bool

 

PerInstanceTick

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...,
    float DeltaSeconds
)

Ticks the per instance data for this interface, if it has any.

Public function Virtual

bool

 

PerInstanceTickPostSimulate

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...,
    float DeltaSeconds
)

Public function Virtual Const

bool

 

PostSimulateCanOverlapFrames()

When set to true the simulation may not complete in the same frame it started, allowing maximum overlap with the GameThread.

Public function Virtual

bool

 

UpgradeFunctionCall

(
    FNiagaraFunctionSignature& Functio...
)

Allows data interfaces the opportunity to rename / change the function signature and perform an upgrade.

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Constants