The audio asset currently assigned to play.
Readonly
durationThe length (in seconds) of the current sound assigned to play.
If disabled, the Component will stop enacting its behavior.
Length (in seconds) of a volume fade in applied to the beginning of sound playback.
Length (in seconds) of a volume fade out applied to the end of sound playback.
When true, records sound directly into the snap. This mode works only when all Audio Components in the scene are using mix to snap. In this case input from microphone will be ignored.
Wearable Only
playbackHow the audio should be played back. Useful in optimizing audio in Spectacles.
The current playback time in seconds
The volume of audio recorded to the snap, from 0 to 1.
Readonly
sceneThe scene object this component is on.
Readonly
spatialSpatial Audio settings.
Readonly
uniqueA volume multiplier for any sounds played by this AudioComponent.
Returns the SceneObject the component is attached to.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Sets the callback function to be called whenever this sound stops playing.
Used to play audio in a Lens. You can assign an AudioTrackAsset to play through script or through the AudioComponent's inspector in Lens Studio. See the Playing Audio guide for more information.
Example