Input Text Field

How to add input text field in the game, which accepts some text given by the player.

Unity offers the static function GUI.TextField:

The user input is returned by this function as a String, which needs getting used to!

Therefore you have to call the function in every OnGUI(), like in the example inthe Scripting Reference: