Class AudioAffordanceReceiver
Audio affordance receiver. Requires an Audio Source and plays audio clips stored in the Audio Affordance Theme Datum.
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Audio
Syntax
[RequireComponent(typeof(AudioSource))]
[AddComponentMenu("Affordance System/Receiver/Audio/Audio Affordance Receiver", 12)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@2.3/api/UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Audio.AudioAffordanceReceiver.html")]
public class AudioAffordanceReceiver : MonoBehaviour
Properties
affordanceStateProvider
Affordance state provider component to subscribe to.
Declaration
public BaseAffordanceStateProvider affordanceStateProvider { get; set; }
Property Value
Type | Description |
---|---|
BaseAffordanceStateProvider |
affordanceThemeDatum
Affordance theme datum property used as a template for creating the runtime copy used during initialization.
Declaration
public AudioAffordanceThemeDatumProperty affordanceThemeDatum { get; set; }
Property Value
Type | Description |
---|---|
AudioAffordanceThemeDatumProperty |
audioSource
Audio Source where the audio clip will be played.
Declaration
public AudioSource audioSource { get; set; }
Property Value
Type | Description |
---|---|
AudioSource |
Methods
Awake()
See MonoBehaviour.
Declaration
protected void Awake()
OnDisable()
See MonoBehaviour.
Declaration
protected void OnDisable()
OnEnable()
See MonoBehaviour.
Declaration
protected void OnEnable()
OnValidate()
See MonoBehaviour.
Declaration
protected void OnValidate()