Check the code what is wrong

Hi, I manage to check if the login is invalid, and if it is correct. and it shows me a message if login is successful but it wont redirect me to the next page after login. and I have been trying to figure it out. I am a beginner in Unity and just started learning and I know to you it may not be complicated but for someone new it is confusing.
It would be great if someone explain this to me and how to fix it.
and when i did try and catch the error showed as the following:
LoadSceneAsyncNameIndexInternal can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.


I am trying to do a login page

How to report your problem productively in the Unity3D forums:

http://plbm.com/?p=220

How to understand compiler and other errors and even fix them yourself:

https://discussions.unity.com/t/824586/8

If you post a code snippet, ALWAYS USE CODE TAGS:

How to use code tags: https://discussions.unity.com/t/481379

You might consider starting with any one of the 4 million Youtube tutorials.

7005182--828236--Screen Shot 2021-04-04 at 9.00.36 AM.png

1 Like