Resolve WES-49 "Courses list"
This commit is contained in:
@@ -1,11 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ChangeSceneOnClick : MonoBehaviour
|
||||
{
|
||||
public static void loadScene(string sceneName) {
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
}
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ChangeSceneOnClick : MonoBehaviour
|
||||
{
|
||||
// Backwards compatible because SOMEONE did not use correct naming convention
|
||||
public void loadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
// Load scene from path name
|
||||
public void LoadScene(string sceneName)
|
||||
{
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
// Load scene from reference
|
||||
public void LoadScene(Scene scene)
|
||||
{
|
||||
SceneManager.LoadScene(scene.buildIndex);
|
||||
}
|
||||
|
||||
// Load scene from build index
|
||||
public void LoadScene(int buildIndex)
|
||||
{
|
||||
SceneManager.LoadScene(buildIndex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user