Browse Source

Backwards compatibility with Unity 5_0

master
chrisgregan 9 years ago
parent
commit
47809e496f
  1. 9
      Assets/Fungus/Flowchart/Scripts/SceneLoader.cs

9
Assets/Fungus/Flowchart/Scripts/SceneLoader.cs

@ -1,5 +1,8 @@
using UnityEngine;
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2
#else
using UnityEngine.SceneManagement;
#endif
using System.Collections;
using System;
@ -71,11 +74,11 @@ namespace Fungus
}
// Load the scene (happens at end of frame)
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2
#if UNITY_5_0 || UNITY_5_1 || UNITY_5_2
Application.LoadLevel(sceneToLoad);
#else
#else
SceneManager.LoadScene(sceneToLoad);
#endif
#endif
yield return new WaitForEndOfFrame();

Loading…
Cancel
Save