Exemple #1
0
 void LateUpdate()
 {
     try
     {
         updateParticles();
     }
     catch (System.Exception e)
     {
         ErrorText.SetException(e);
     }
 }
Exemple #2
0
    private IEnumerator ReloadLevel(float inSeconds)
    {
        yield return(new WaitForSeconds(inSeconds));

        try
        {
            // use the new Application.LoadLevel(Application.loadedLevel);
            UnityEngine.SceneManagement.SceneManager.LoadScene(
                UnityEngine.SceneManagement.SceneManager.GetSceneAt(0).buildIndex,
                UnityEngine.SceneManagement.LoadSceneMode.Single);
        }
        catch (Exception e)
        {
            ErrorText.SetException(e);
        }
    }