Fix issues with scene loading, introduce an intermediate bootstrap scene
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MainMenu : MonoBehaviour
|
||||
{
|
||||
public void StartGame()
|
||||
public async void StartGame()
|
||||
{
|
||||
// Replace with the actual scene name as set in Build Settings
|
||||
SceneManager.LoadScene("AppleHillsOverworld");
|
||||
var progress = new Progress<float>(p => Debug.Log($"Loading progress: {p * 100:F0}%"));
|
||||
await SceneManagerService.Instance.SwitchSceneAsync("AppleHillsOverworld", progress);
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
|
||||
Reference in New Issue
Block a user