Hi all,
Iam trying to get the value of an input field but I am getting erros. Hope you guys can help me:
I have the following code on my script:
function connect_www(){
var value = GameObject.Find("login").GetComponent(Text).text;
Debug.Log("Valor: "+valor);
var form = new WWWForm();
form.AddField( "login", login);
}
When I run I get the following error:
Object reference not set to an instance of an object
main.connect_www() (at Assets/main.js:16)
I have a button on the screen that when it is clicked runs this function. I also have an input field that has the name “login”.