CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
CriAtomListener Class Reference

A component that represents a 3D listener. More...

Inherits CriMonoBehaviour.

Public Member Functions

void ActivateListener (bool exclusive=true)
 Make it an active listener More...
 

Public Attributes

bool activateListenerOnEnable = false
 Whether to make it an exclusive active listener in OnEnable More...
 

Properties

CriAtomEx3dListener nativeListener [get, protected set]
 This is the CriAtomEx3dListener used internally. More...
 
bool isActive [get, set]
 Whether the CriAtomListener is active More...
 
CriAtomRegion region3d [get, set]
 Sets/gets 3D region of the sound source
 

Detailed Description

A component that represents a 3D listener.

Description:
Usually, it is used by attaching it to the GameObject object of the camera or main character. The current position is updated automatically, so no special operation or setting is required.

Member Function Documentation

void ActivateListener ( bool  exclusive = true)
inline

Make it an active listener

Parameters
exclusiveWhether to make this AtomListener the only active listener
Description:
When it becomes an active listener, it acts as a 3D listener for CriWare.CriAtomSource .
Note:
For compatibility with old plugins, when called with no arguments,
only the CriAtomListener calling this method will be active.

Member Data Documentation

bool activateListenerOnEnable = false

Whether to make it an exclusive active listener in OnEnable

Description:
If true, when OnEnable is called, this listener will be activated and all the other listeners will be deactivated. If false, it will become active without affecting other listeners.

Property Documentation

CriAtomEx3dListener nativeListener
getprotected set

This is the CriAtomEx3dListener used internally.

Description:
If you want to control CriAtom3dListener directly, get CriAtom3dListener from this property.
bool isActive
getset

Whether the CriAtomListener is active

Description:
An active CriAtomListener acts as a listener for CriAtomSource audio.
If there are multiple CriAtomListeners, The 3D sound will be calculated
using the active listener that is closest to the CriAtomSource.

The documentation for this class was generated from the following file: