private void Start() { var componentInChildren = GetComponentsInChildren <TextMeshPro>(); placeholder = componentInChildren[0]; inputArea = componentInChildren[1]; if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(false); } #if WINDOWS_UWP // Windows mixed reality keyboard initialization goes here wmrKeyboard = gameObject.AddComponent <MixedRealityKeyboard>(); wmrKeyboard.OnShowKeyboard?.AddListener(() => { if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(true); } }); wmrKeyboard.OnHideKeyboard?.AddListener(() => { if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(false); } }); #endif }
private void Start() { #if !UNITY_EDITOR && UNITY_WSA // Windows mixed reality keyboard initialization goes here wmrKeyboard = gameObject.AddComponent <MixedRealityKeyboard>(); #elif UNITY_IOS || UNITY_ANDROID // non-Windows mixed reality keyboard initialization goes here #endif }
private void Start() { #if WINDOWS_UWP // Windows mixed reality keyboard initialization goes here wmrKeyboard = gameObject.AddComponent <MixedRealityKeyboard>(); #elif UNITY_IOS || UNITY_ANDROID // non-Windows mixed reality keyboard initialization goes here #else debugMessage.text = "Keyboard not supported on this platform."; #endif }
private void Start() { // Initially hide the preview. if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(false); } #if WINDOWS_UWP // Windows mixed reality keyboard initialization goes here wmrKeyboard = gameObject.AddComponent <MixedRealityKeyboard>(); wmrKeyboard.DisableUIInteractionWhenTyping = disableUIInteractionWhenTyping; if (wmrKeyboard.OnShowKeyboard != null) { wmrKeyboard.OnShowKeyboard.AddListener(() => { if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(true); } }); } if (wmrKeyboard.OnHideKeyboard != null) { wmrKeyboard.OnHideKeyboard.AddListener(() => { if (mixedRealityKeyboardPreview != null) { mixedRealityKeyboardPreview.gameObject.SetActive(false); } }); } #elif UNITY_IOS || UNITY_ANDROID // non-Windows mixed reality keyboard initialization goes here #else debugMessage.text = "Keyboard not supported on this platform."; #endif }
// Start is called before the first frame update void Start() { network_manager = FindObjectOfType <NetworkManager>(); http_fetcher = FindObjectOfType <HttpFileFetcher>(); data_manager = FindObjectOfType <DataManager>(); reader = FindObjectOfType <Reader>(); placement_manager = FindObjectOfType <PlacementManager>(); hololensMenuTransform = hololensMenu.transform; keyboard = this.GetComponent <MixedRealityKeyboard>(); nameInputField = nameInput.GetComponent <TMP_InputField>(); nameInputField.text = network_manager.defaultName; connectedUsersText = connectedUsers.GetComponent <TextMeshProUGUI>(); serverFileDropdown = serverFileDropdown_obj.GetComponent <TMP_Dropdown>(); localFileDropdown = localFileDropdown_obj.GetComponent <TMP_Dropdown>(); selectedFile_text = selectedFile_obj.GetComponent <TextMeshProUGUI>(); //LODSlider = LODSliderObj.GetComponent<Slider>(); SetLegendColor(); SwitchHandMenu(0); }