It looks like you're new here. If you want to get involved, click one of these buttons!
static void Main( ) {
Delay;
Function( );
}
static void Function( ) {
Console.WriteLine("Function Called");
Oops, I meant before calling.
Is it C#, if yes, you will have to use Coroutines
static void Main() { StartCoroutine(Function()); } IEnumerator Function() { yield return new WaitForSeconds(5f); //5f is the seconds to wait Console.WriteLine("Function Called"); }
I tried that. it works in visual studio when opened with unity, but doesn't work with visual studio code
You can use Thread.Sleep:
System.Threading.Thread.Sleep(timeInMiliseconds);
Answers
Oops, I meant before calling.
Is it C#, if yes, you will have to use Coroutines
I tried that. it works in visual studio when opened with unity, but doesn't work with visual studio code
You can use Thread.Sleep:
System.Threading.Thread.Sleep(timeInMiliseconds);