I'm trying to make a chat box appear with a simple function, so I'm adding all the fields in the background - back panel, top bar, messages, and that's all working well enough.
I'm now trying to add an InputField in much the same way as the others, and running into problems.
Here's what I have so far:
private InputField nameInputField;
string placeHolderText = "";
and then
nameInputField = new InputField ();
placeHolderText = nameInputField.placeholder.GetComponent<Text> ().text = "type something here";
I'm getting an error on nameInputField = new InputField (); , and not sure why.
Further, I'd like to be able to manipulate the location and dimensions of the InputField, along with the font and other formatting issues.