fix scene(failed)
This commit is contained in:
@@ -13,7 +13,7 @@ public class UmaSceneController:MonoBehaviour
|
|||||||
{
|
{
|
||||||
if (instance)
|
if (instance)
|
||||||
{
|
{
|
||||||
Destroy(this.gameObject);
|
Destroy(instance.gameObject);
|
||||||
}
|
}
|
||||||
instance = this;
|
instance = this;
|
||||||
DontDestroyOnLoad(this);
|
DontDestroyOnLoad(this);
|
||||||
@@ -26,9 +26,10 @@ public class UmaSceneController:MonoBehaviour
|
|||||||
|
|
||||||
IEnumerator LoadLiveSceneAsync(string sceneName, Action OnSceneloaded, Action OnLastSceneUnloaded)
|
IEnumerator LoadLiveSceneAsync(string sceneName, Action OnSceneloaded, Action OnLastSceneUnloaded)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (CavansInstance)
|
if (CavansInstance)
|
||||||
{
|
{
|
||||||
Destroy(CavansInstance);
|
//Destroy(CavansInstance);
|
||||||
}
|
}
|
||||||
CavansInstance = Instantiate(CavansPrefab, transform);
|
CavansInstance = Instantiate(CavansPrefab, transform);
|
||||||
var animation = CavansInstance.GetComponent<Animation>();
|
var animation = CavansInstance.GetComponent<Animation>();
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public class UmaViewerMain : MonoBehaviour
|
|||||||
string filePath = asset.FilePath;
|
string filePath = asset.FilePath;
|
||||||
if (File.Exists(filePath))
|
if (File.Exists(filePath))
|
||||||
{
|
{
|
||||||
AssetBundle bundle = AssetBundle.LoadFromFile(filePath);
|
AssetBundle bundle = UmaViewerBuilder.LoadOrGet(asset);
|
||||||
foreach (var item in UmaDatabaseController.Instance.LiveData)
|
foreach (var item in UmaDatabaseController.Instance.LiveData)
|
||||||
{
|
{
|
||||||
var musicId = Convert.ToInt32(item["music_id"]);
|
var musicId = Convert.ToInt32(item["music_id"]);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using System.Data;
|
|||||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||||
using CriWare;
|
using CriWare;
|
||||||
using static UmaViewerAudio;
|
using static UmaViewerAudio;
|
||||||
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
namespace Gallop.Live
|
namespace Gallop.Live
|
||||||
{
|
{
|
||||||
@@ -504,6 +505,21 @@ namespace Gallop.Live
|
|||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
if (Input.GetKeyDown(KeyCode.Escape))
|
||||||
|
{
|
||||||
|
UmaSceneController.instance.LoadScene("Version2",
|
||||||
|
delegate ()
|
||||||
|
{
|
||||||
|
AssetBundle.UnloadAllAssetBundles(true);
|
||||||
|
},
|
||||||
|
delegate ()
|
||||||
|
{
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_isLiveSetup)
|
if (_isLiveSetup)
|
||||||
{
|
{
|
||||||
if(_syncTime == false)
|
if(_syncTime == false)
|
||||||
|
|||||||
Reference in New Issue
Block a user