Horje
Unity c#loading a scene after a few seconds Code Example
Unity c#loading a scene after a few seconds
void Start()
{
    //Start the coroutine we define below named ChangeAfter2SecondsCoroutine().
    StartCoroutine(ChangeAfter2SecondsCoroutine());
}

IEnumerator ChangeAfter2SecondsCoroutine()
{
    //Print the time of when the function is first called.
    Debug.Log("Started Coroutine at timestamp : " + Time.time);

    //yield on a new YieldInstruction that waits for 2 seconds.
    yield return new WaitForSeconds(2);

    //After we have waited 2 seconds print the time again.
    Debug.Log("Finished Coroutine at timestamp : " + Time.time);
    //And load the scene
    Application.LoadLevel("Game");  //<-- This is the correct name of the scene
}




Csharp

Related
c# array remove first element Code Example c# array remove first element Code Example
C# 1 minute delay Code Example C# 1 minute delay Code Example
c# list remove duplicate items Code Example c# list remove duplicate items Code Example
trump Code Example trump Code Example
Donald trump Code Example Donald trump Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10