Class AudioFeedbackPlayer
AudioFeedbackPlayer eases playing single audio feedback. Good for audio effects.
Implements
MonoBehaviour
Namespace: Microsoft.MixedReality.Toolkit.Examples.Demos.EyeTracking
Assembly: cs.temp.dll.dll
Syntax
public class AudioFeedbackPlayer : MonoBehaviour, MonoBehaviour
Properties
Instance
Declaration
public static AudioFeedbackPlayer Instance { get; }
Property Value
Type | Description |
---|---|
AudioFeedbackPlayer |
Instance
Declaration
public static AudioFeedbackPlayer Instance { get; }
Property Value
Type | Description |
---|---|
AudioFeedbackPlayer |
Methods
PlaySound(AudioClip)
Play a sound on the most recently set up GameObject.
Declaration
public void PlaySound(AudioClip audiofx)
Parameters
Type | Name | Description |
---|---|---|
AudioClip | audiofx | The AudioClip to play. |
PlaySound(AudioClip)
Play a sound on the most recently set up GameObject.
Declaration
public void PlaySound(AudioClip audiofx)
Parameters
Type | Name | Description |
---|---|---|
AudioClip | audiofx | The AudioClip to play. |
SetupAudioSource(GameObject)
Ensures an audio source on the GameObject and returns it.
Declaration
public AudioSource SetupAudioSource(GameObject targetGameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | targetGameObject | The GameObject to play the desired audio. |
Returns
Type | Description |
---|---|
AudioSource | The AudioSource on the GameObject. |
SetupAudioSource(GameObject)
Ensures an audio source on the GameObject and returns it.
Declaration
public AudioSource SetupAudioSource(GameObject targetGameObject)
Parameters
Type | Name | Description |
---|---|---|
GameObject | targetGameObject | The GameObject to play the desired audio. |
Returns
Type | Description |
---|---|
AudioSource | The AudioSource on the GameObject. |
Implements
MonoBehaviour