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