/// <summary> /// Performs initialization related to the voice commands. /// </summary> private void InitVoiceCommands() { voiceCommands = new Dictionary <string, Action>(); voiceCommandsManager = FindObjectOfType <VoiceCommandsManager>(); if (voiceCommandsManager != null) { voiceCommands.Add(VoiceCommandsManager.PlaceMenuPinKeyword, BindToUser); voiceCommandsManager.SpeechKeywordRecognized += OnSpeechKeywordRecognized; } else { Debug.LogError("OnboardingMagnet.cs expects an instance of VoiceCommandsManager in the scene."); } }
/// <summary> /// Performs initialization related to the voice commands. /// </summary> private void InitVoiceCommands() { voiceCommands = new Dictionary <string, Action>(); voiceCommandsManager = FindObjectOfType <VoiceCommandsManager>(); if (voiceCommandsManager != null) { voiceCommands.Add(VoiceCommandsManager.ExpandKeyword, EnableActiveState); voiceCommands.Add(VoiceCommandsManager.CollapseKeyword, DisableActiveState); voiceCommandsManager.SpeechKeywordRecognized += OnSpeechKeywordRecognized; } else { Debug.LogError("Souvenir.cs expects an instance of VoiceCommandsManager in the scene."); } }