FSlateSound

An intermediary to make UBaseSound available for Slate to play sounds

Choose your operating system:

Windows

macOS

Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Sound/SlateSound.h

Include

#include "Sound/SlateSound.h"

Syntax

struct FSlateSound

Remarks

An intermediary to make UBaseSound available for Slate to play sounds

Variables

Name Description

Protected variable

TObjectPtr< UOb...

 

ResourceObject

Pointer to the USoundBase.

Constructors

Name Description

Public function

FSlateSound()

Default constructor.

Functions

Name Description

Public function Const

UObject *...

 

GetResourceObject()

Get the resource object associated with this sound

Public function

bool

 

SerializeFromMismatchedTag

(
    FPropertyTag const& Tag,
    FStructuredArchive::FSlot Slot
)

Used to upgrade a FName property to a FSlateSound property

Public function

void

 

SetResourceObject

(
    UObject* InResourceObject
)

Sets the sound that is supposed to be played.

Deprecated Variables

Name Description

Protected variable

FName

 

LegacyResourceName_DEPRECATED

The legacy resource name; only used by sounds that have been set-up in code, or otherwise upgraded from old FName properties, set to NAME_None in non-legacy instances

Protected variable

TWeakObjectPtr<...

 

LegacyResourceObject_DEPRECATED

A weak pointer the the resource loaded from the legacy resource name; may be null if the resource needs (re)loading

Deprecated Functions

Name Description

Public function Static

FSlateSound

 

FromName_DEPRECATED

(
    const FName& SoundName
)

Construct a FSlateSound from a FName

Public function

void

 

StripLegacyData_DEPRECATED()

Used when updating the ResourceObject within an FSlateSound from the editor to clear out any legacy data that may be set.