how to wait in c#
System.Threading.Thread.Sleep(Milliseconds);
how to make a line of code wait c#
//In the example below the script will right "Hello" and 3 seconds later write "Goodbye" in the console
Start()
{
//Call the function Example()
StartCoroutine(Example());
}
Example()
{
Console.WriteLine("Hello");
//wait 3 seconds
yield return new WaitForSeconds(3);
Console.WriteLine("Goodbye");
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us