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?

If you’re using Unity’s UI:

InputField txt_Input = GameObject.Find("ObjectName").GetComponent<InputField>();

String ObjectsText = txt_Input.text;