protected override void OnEnable() { base.OnEnable(); CheckAsteriskChar(); MobileInputBehaviour v_nativeBox = GetComponent <MobileInputBehaviour>(); if (MobileInputBehaviour.IsSupported()) { if (v_nativeBox == null && Application.isPlaying) { v_nativeBox = gameObject.AddComponent <MobileInputBehaviour>(); } } //Not Supported Platform else { if (Application.isPlaying) { if (v_nativeBox != null) { Debug.LogWarning("[TMP_NativeInputField] Not Supported Platform (sender " + name + ")"); GameObject.Destroy(v_nativeBox); } } } //Activate native edit box if (v_nativeBox != null) { v_nativeBox.hideFlags = HideFlags.None; if (enabled && !v_nativeBox.enabled) { v_nativeBox.enabled = true; } } RegisterEvents(); //Update Simbling Index if (CachedInputRenderer != null && m_TextComponent != null) { CachedInputRenderer.transform.SetSiblingIndex(m_TextComponent.transform.GetSiblingIndex()); AssignPositioningIfNeeded(); } }
protected override void OnEnable() { base.OnEnable(); CheckAsteriskChar(); MobileInputBehaviour v_nativeBox = GetComponent <MobileInputBehaviour>(); if (MobileInputBehaviour.IsSupported()) { if (v_nativeBox == null && Application.isPlaying) { v_nativeBox = gameObject.AddComponent <MobileInputBehaviour>(); } } //Not Supported Platform else { if (Application.isPlaying) { if (v_nativeBox != null) { Debug.LogWarning("[NativeInputField] Not Supported Platform (sender " + name + ")"); GameObject.Destroy(v_nativeBox); } } } //Activate native edit box if (v_nativeBox != null) { v_nativeBox.hideFlags = HideFlags.None; if (enabled && !v_nativeBox.enabled) { v_nativeBox.enabled = true; } } RegisterEvents(); }
protected bool IsNativeKeyboardSupported() { var v_isSupported = TouchScreenKeyboard.isSupported && shouldHideMobileInput && MobileInputBehaviour.IsSupported(); return(v_isSupported); }
protected bool IsUnityKeyboardSupported() { var v_isSupported = TouchScreenKeyboard.isSupported && (!shouldHideMobileInput || !MobileInputBehaviour.IsSupported()); return(v_isSupported); }