SoundReference#
A Sound a script plays with Scene.PlaySound: one chosen in the Inspector (by ID), or a library path such as "Sounds/Hit". Sounds chosen in the Inspector or shelved in a library ship with the game.
public readonly record struct SoundReference(string Id)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Id | string | get; init; | required |
Members: Conversions · IsSet
Conversions#
public static implicit operator SoundReference(string idOrLibraryPath);IsSet#
public bool IsSet { get; }False when no sound was chosen.
Source#
- SoundAsset.cs