Question by
dironya · Oct 24, 2016 at 05:23 AM ·
3dinputfieldxyz
How to use input field value in scripting?
I need to get a user input in my game while user playing the game and I have to use it for x,y,z values. I'm trying to say i have 3 input field, and I have to get x,y,z value from that by user input. then i have to use it in my script.. Can u help me to solve this?
Comment
Answer by Cynikal · Oct 24, 2016 at 05:39 AM
If you're using Unity's UI:
InputField txt_Input = GameObject.Find("ObjectName").GetComponent<InputField>();
String ObjectsText = txt_Input.text;