Merge branch 'master' of https://github.com/croakfang/UmaViewer
This commit is contained in:
@@ -14,14 +14,15 @@ public class UmaSceneController:MonoBehaviour
|
||||
if (instance)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
instance = this;
|
||||
DontDestroyOnLoad(this);
|
||||
}
|
||||
|
||||
public void LoadScene(string name, Action OnSceneloaded = null, Action OnLastSceneUnloaded = null)
|
||||
public static void LoadScene(string name, Action OnSceneloaded = null, Action OnLastSceneUnloaded = null)
|
||||
{
|
||||
StartCoroutine(LoadLiveSceneAsync(name, OnSceneloaded, OnLastSceneUnloaded));
|
||||
instance.StartCoroutine(instance.LoadLiveSceneAsync(name, OnSceneloaded, OnLastSceneUnloaded));
|
||||
}
|
||||
|
||||
IEnumerator LoadLiveSceneAsync(string sceneName, Action OnSceneloaded, Action OnLastSceneUnloaded)
|
||||
|
||||
@@ -682,7 +682,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
||||
GameObject.Find("AudioManager")
|
||||
};
|
||||
|
||||
UmaSceneController.instance.LoadScene("LiveScene",
|
||||
UmaSceneController.LoadScene("LiveScene",
|
||||
delegate ()
|
||||
{
|
||||
// Move the GameObject (you attach this in the Inspector) to the newly loaded Scene
|
||||
|
||||
@@ -502,7 +502,7 @@ namespace Gallop.Live
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
isExit = true;
|
||||
UmaSceneController.instance.LoadScene("Version2");
|
||||
UmaSceneController.LoadScene("Version2");
|
||||
AssetBundle.UnloadAllAssetBundles(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user