Class AudioAffordanceReceiver
Audio affordance receiver. Requires an Audio Source and plays audio clips stored in the Audio Affordance Theme Datum.
Inherited Members
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.Interaction.Toolkit.AffordanceSystem.Receiver.Audio
Assembly: Unity.XR.Interaction.Toolkit.dll
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.5/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()