I am not a Unity/C# expert and I can't understand this error related to the StartCoroutine line, please not that the first time it works fine but it fails only the second time.
Do i need to destroy something before run it again? Or am I using it in a wronge way.
Probably is a common issue but I haven't found the solution yet.
ERROR
NullReferenceException: Object reference not set to an instance of an object
public void onSubmit()
{
StartCoroutine(this.LoginUser(inputUsername.text, inputPassword.text)); ERROR ON THIS LINE
}
private IEnumerator LoginUser(string username, string password)
{
....
}
Thanks in advance