Class AudioSceneComponent
Implements
Constructors
constructor
-
Creates a new instance of the component for the given scene
Returns AudioSceneComponent
Properties
audio Listener Position Provider
Gets or Sets a custom listener position for all sounds in the scene By default, this is the position of the first active camera
audio Listener Rotation Provider
Gets or Sets a custom listener rotation for all sounds in the scene By default, this is the rotation of the first active camera
audio Positioning Refresh Rate
Gets or sets a refresh rate when using 3D audio positioning
Readonlyname
The component name helpful to identify the component in the list of scene components.
scene
The scene the component belongs to.
Accessors
audio Enabled
-
get audioEnabled(): boolean
Gets whether audio is enabled or not. Please use related enable/disable method to switch state.
Returns boolean
headphone
-
get headphone(): boolean
Gets whether audio is outputting to headphone or not. Please use the according Switch methods to change output.
Returns boolean
Methods
add From Container
-
Adds all the elements from the container to the scene
Parameters
- container: IAssetContainer
the container holding the elements
Returns void
- container: IAssetContainer
disable Audio
-
Disables audio in the associated scene.
Returns void
dispose
-
Disposes the component and the associated resources.
Returns void
enable Audio
-
Enables audio in the associated scene.
Returns void
rebuild
-
Rebuilds the elements related to this component in case of context lost for instance.
Returns void
register
-
Registers the component in a given scene
Returns void
remove From Container
-
Removes all the elements in the container from the scene
Parameters
- container: IAssetContainer
contains the elements to remove
- dispose: boolean = false
if the removed element should be disposed (default: false)
Returns void
- container: IAssetContainer
serialize
-
Serializes the component data to the specified json object
Parameters
- serializationObject: any
The object to serialize to
Returns void
- serializationObject: any
switch Audio Mode For Headphones
-
Switch audio to headphone output.
Returns void
switch Audio Mode For Normal Speakers
-
Switch audio to normal speakers.
Returns void
Defines the sound scene component responsible to manage any sounds in a given scene.
Deprecated
please use AudioEngineV2 instead