Improve Scene Loading

This commit is contained in:
CroakFang
2023-07-05 02:22:20 +08:00
parent cf5b45aa35
commit e773f49f8d
15 changed files with 387 additions and 693 deletions
+1 -5
View File
@@ -665,10 +665,8 @@ public class UmaViewerBuilder : MonoBehaviour
{
GameObject MainLive = new GameObject("Live");
GameObject Director = new GameObject("Director");
//Gallop.Live.Director.instance.Play();
List<GameObject> transferObjs = new List<GameObject>() {
MainLive,
Director,
GameObject.Find("ViewerMain"),
GameObject.Find("Camera"),
GameObject.Find("Directional Light"),
@@ -678,7 +676,6 @@ public class UmaViewerBuilder : MonoBehaviour
UmaSceneController.instance.LoadScene("LiveScene",
delegate ()
{
// Move the GameObject (you attach this in the Inspector) to the newly loaded Scene
transferObjs.ForEach(o => SceneManager.MoveGameObjectToScene(o, SceneManager.GetSceneByName("LiveScene")));
@@ -699,11 +696,10 @@ public class UmaViewerBuilder : MonoBehaviour
LoadLiveUma(characters);
Gallop.Live.Director.instance.InitializeTimeline();
},
delegate ()
{
Gallop.Live.Director.instance.InitializeTimeline();
Gallop.Live.Director.instance.Play(live.MusicId, characters[0].CharaEntry.Id);
}
);