0

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

Gelso77
  • 1,555
  • 6
  • 25
  • 43
  • Please use the correct tags! Note that [`[unityscript]`](https://stackoverflow.com/tags/unityscript/info) is or better **was** a custom JavaScript flavor-like language used in early Unity versions and is **long deprecated** by now. Your code is in `c#` – derHugo Jan 10 '22 at 16:57

0 Answers0