Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

My text field is not taking any input

$
0
0
I am writing a GUI application for Unity and I have text box showing which is great but for some reason I can't enter any kind of text into it. Here is the class: /// /// Main function where the GUI windows are created /// /// void OnGUI() { MyFirstWindow(); } /// /// Displays the background survey that the user will fill out /// void MyFirstWindow() { int windowWidth = 800; int windowHeight = 600; //// Make a background box GUI.Box(new Rect((Screen.width / 2) - (windowWidth / 2), (Screen.height / 2) - (windowHeight / 2), windowWidth, windowHeight), "Hello World!"); string txtAge = ""; txtAge = GUI.TextField(new Rect(600, 355, 50, 40), txtAge, 2); }

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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