Quantcast
Channel: Questions in topic: "keyboard"
Viewing all articles
Browse latest Browse all 605

TouchScreenKeyboard flickers

$
0
0
I'm having an issue when i build my scene to an iOS device , the native iOS keyboard flickers endlessly and game becomes non-interactive such that i can't even input any characters onto the textfield. I recently started experimenting with the TouchScreenKeyboard library and tried a bunch of relative solutions on unity answers but its still not resolvable. Here are 3 sections of my input class below. Any help would be great thanks. void Start() { touchKeyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default, true, true, false, false, ""); touchKeyboard.active = false; TouchScreenKeyboard.hideInput = true; //touchKeyboard = new TouchScreenKeyboard("", TouchScreenKeyboardType.Default, true, true, false, false, ""); } //Inside OnGUI() GUI.SetNextControlName("type here..."); playerName = GUI.TextField(new Rect(Screen.width / 2 - Screen.width / 20, Screen.height / 2 - Screen.height / 10, Screen.width / 2.2f, Screen.height / 10), playerName, 12, textStyle); playerName = playerName.Replace("\n", ""); playerName = playerName.Replace(" ", ""); //platform dependent #if UNITY_IPHONE || UNITY_ANDROID MobileKeyboard(); #endif void MobileKeyboard() { if (!isKeyboardOpen && !isDoneInput) { touchKeyboard.active = true; playerName = touchKeyboard.text; } if (touchKeyboard.done) { touchKeyboard.active = false; isKeyboardOpen = true; isDoneInput = true; touchKeyboard.text = touchKeyboard.text.Replace("\n", ""); playerName = touchKeyboard.text; } else if (touchKeyboard.wasCanceled) { touchKeyboard.active = false; touchKeyboard.text = ""; } }

Viewing all articles
Browse latest Browse all 605

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>