/// <summary> /// On click event for the magnet model object. /// </summary> public void OnInputClicked(InputClickedEventData eventData) { if (isPlacingMagnet) { return; } #if UNITY_UWP // On a real Hololens device, we'll navigate to the `FlatApp`. FlatAppHelper.NavigateToFlatApp(); #else // Alternatively, on the Unity Editor since we do not have access to the `FlatApp`, // we'll generate a default souvenir for debugging purposes. var souvenirManager = FindObjectOfType <SouvenirManager>(); souvenirManager.CreateSouvenir("0", "PalmTree", string.Empty); #endif }
private void Start() { keywords = new Dictionary <string, Action>(); var voiceCommandsManager = FindObjectOfType <VoiceCommandsManager>(); if (voiceCommandsManager != null) { voiceCommandsManager.SpeechKeywordRecognized += OnSpeechKeywordRecognized; } keywords.Add(VoiceCommandsManager.OpenMenuKeyword, () => { FlatAppHelper.NavigateToFlatApp(); }); keywords.Add(VoiceCommandsManager.ToggleMeshKeyword, () => { if (SpatialMappingManager.IsInitialized) { SpatialMappingManager.Instance.DrawVisualMeshes = !SpatialMappingManager.Instance.DrawVisualMeshes; } }); }
/// <summary> /// Opens the flat app. /// </summary> protected void SwitchToFlatApp() { FlatAppHelper.NavigateToFlatApp(); }
public void OnInputClicked(InputClickedEventData eventData) { FlatAppHelper.NavigateToFlatApp(); Destroy(gameObject); }