mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-17 06:26:54 +07:00
example script to separate folders
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
using UnityEngine.SceneManagement;
|
||||
#endif
|
||||
|
||||
namespace IsoTools.Examples {
|
||||
public class SceneController : MonoBehaviour {
|
||||
@@ -29,19 +26,15 @@ namespace IsoTools.Examples {
|
||||
}
|
||||
|
||||
public void NextScene() {
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
SceneManager.LoadScene(NextSceneName);
|
||||
#else
|
||||
Application.LoadLevel(NextSceneName);
|
||||
#endif
|
||||
if ( !string.IsNullOrEmpty(NextSceneName) ) {
|
||||
SceneManager.LoadScene(NextSceneName);
|
||||
}
|
||||
}
|
||||
|
||||
public void PrevScene() {
|
||||
#if UNITY_5_3_OR_NEWER
|
||||
SceneManager.LoadScene(PrevSceneName);
|
||||
#else
|
||||
Application.LoadLevel(PrevSceneName);
|
||||
#endif
|
||||
if ( !string.IsNullOrEmpty(PrevSceneName) ) {
|
||||
SceneManager.LoadScene(PrevSceneName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user