Cara menggunakan Input Field Unity

public string theName;
    public GameObject inputField;
    public GameObject textDisplay;
    
    public void StoreName()
    {
        theName = inputField.GetComponent<Text>().text;
        textDisplay.GetComponent<Text>().text = theName;
    }
Dull Dingo