// Copyright (c) Microsoft Corporation. // Licensed under the MIT License using System; using UnityEngine; using UnityEngine.Events; namespace Microsoft.MixedReality.Toolkit.Experimental.InteractiveElement { /// /// A container for a keyword and its associated Unity event. This container is utilized /// in SpeechKeywordEvents. /// [Serializable] public class KeywordEvent { [SerializeField] [Tooltip("The Keyword for the Speech Handler to listen for if speech is enabled. If this keyword is recognized, the OnKeywordRecognized" + "event will fire. This keyword must also be registered in the Speech Input configuration profile. ")] private string keyword; /// /// The Keyword for the Speech Handler to listen for if speech is enabled. If this keyword is recognized, the OnKeywordRecognized /// event will fire. This keyword must also be registered in the Speech Input configuration profile. /// public string Keyword { get => keyword; set => keyword = value; } /// /// Unity Event fired when a specific keyword is recognized. /// public UnityEvent OnKeywordRecognized = new UnityEvent(); } }