public void InitVoiceCommands(VoiceInputManager voiceInputManager) { voiceInputManager.AddInputCommand(InputAction.Create("Show Telemetry", KeyCode.T, "Show Telemetry UI", () => { TurnOn(); })); voiceInputManager.AddInputCommand(InputAction.Create("Hide Telemetry", KeyCode.R, "Hide Telemetry UI", () => { TurnOff(); })); }
// Start is called before the first frame update void Start() { if (VoiceInputManager != null && FollowMeToggle != null) { VoiceInputManager.AddInputCommand(InputAction.Create("Follow", KeyCode.A, "Toggles Follow Me", () => { FollowMeToggle.ToggleFollowMeBehavior(); })); } VoiceInputManager.EnableInput(); }