From 3ca263a25e61306b67cc7517c12e1a179822f677 Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 22 Dec 2015 15:56:24 +0000 Subject: [PATCH 1/2] Replace obsolete call to Application.LoadLevel --- Assets/Fungus/Flowchart/Scripts/SceneLoader.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs index e0f982f3..08403788 100644 --- a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs +++ b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.SceneManagement; using System.Collections; using System; @@ -70,7 +71,11 @@ namespace Fungus } // Load the scene (happens at end of frame) + #if UNITY_5_0 || UNITY_5_1 || UNITY_5_2 Application.LoadLevel(sceneToLoad); + #else + SceneManager.LoadScene(sceneToLoad); + #endif yield return new WaitForEndOfFrame(); From 47809e496f0a782e6bb7bd14bbb8e51370b4c69e Mon Sep 17 00:00:00 2001 From: chrisgregan Date: Tue, 22 Dec 2015 16:05:03 +0000 Subject: [PATCH 2/2] Backwards compatibility with Unity 5_0 --- Assets/Fungus/Flowchart/Scripts/SceneLoader.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs b/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs index 08403788..8c1a5ce5 100644 --- a/Assets/Fungus/Flowchart/Scripts/SceneLoader.cs +++ b/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();