Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Sound
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
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UObject > | ResourceObject | Pointer to the USoundBase. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSlateSound () |
Default constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UObject * | Get the resource object associated with this sound | ||
| bool | SerializeFromMismatchedTag
(
FPropertyTag const& Tag, |
Used to upgrade a FName property to a FSlateSound property | |
| void | SetResourceObject
(
UObject* InResourceObject |
Sets the sound that is supposed to be played. |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| 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 | |
| TWeakObjectPtr< UObject > | 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
| Type | Name | Description | |
|---|---|---|---|
| FSlateSound | FromName_DEPRECATED
(
const FName& SoundName |
Construct a FSlateSound from a FName | |
| void | Used when updating the ResourceObject within an FSlateSound from the editor to clear out any legacy data that may be set. |