- Home /
Question by
MakakWasTaken · Oct 07, 2015 at 08:23 AM ·
uiinputruntimeinputfieldruntime-generation
UI Get InputField value
I can't figure out how to use the
InputField.text
variable as it always returns "". Here is how I use it:
GameObject g = Instantiate(InputObj);
g.name = CurMenu.Title[i];
g.GetComponent<InputField>().onValueChange.AddListener(delegate { Debug.Log(g.GetComponent<InputField>().text);}); //This line always returns the initial value and not the value that it currently is.
Comment
Your answer
Follow this Question
Related Questions
UI InputField text sometimes invisible? 1 Answer
Implicit "Horizontal" Axis exceptions? 1 Answer
Inputfield text to String variable 1 Answer
How can I block Copy Paste from Input Field? 3 Answers
UI slider "End slide" event 3 Answers