From 198ff8d7ba59e6aba6e9043a0446afab61cf3db0 Mon Sep 17 00:00:00 2001 From: Escafermo <31081737+Escafermo@users.noreply.github.com> Date: Thu, 17 Aug 2017 22:31:20 -0300 Subject: [PATCH] [Obsolete Function] Application.LoadLevel Changed Since Application.LoadLevel is obsolete in Unity 5+, I went ahead and updated it to SceneManager.LoadScene here and in the NumberWizard.cs. Of course, also added UnityEngine.SceneManagement at the start. --- Assets/Scripts/LevelManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/LevelManager.cs b/Assets/Scripts/LevelManager.cs index 896c4ba..55b8e28 100644 --- a/Assets/Scripts/LevelManager.cs +++ b/Assets/Scripts/LevelManager.cs @@ -1,11 +1,12 @@ using UnityEngine; using System.Collections; +using UnityEngine.SceneManagement; public class LevelManager : MonoBehaviour { public void LoadLevel(string name){ Debug.Log ("New Level load: " + name); - Application.LoadLevel (name); + SceneManager.LoadScene (name); } public void QuitRequest(){