How to use the InputField to output to the console?

I need to get text from a input field UI from the menu in-game and not pre-specified string.
public void OnSubmitName(string Name)

Is there any option to do this from the menu itself Unity?
April 3rd 20 at 17:42
2 answers
April 3rd 20 at 17:44
Try this
using UnityEngine.UI;
public InputField Txt;
public void OnSubmitName()

There will appear a field for the InputField will have to add it.
April 3rd 20 at 17:46
After changing the code ceased to display any text)

Find more questions by tags C#Unity Game Engine