Fix issues with scene loading, introduce an intermediate bootstrap scene

This commit is contained in:
Michal Pikulski
2025-09-12 15:37:26 +02:00
parent cec661586e
commit 0057ae9fa3
5 changed files with 168 additions and 7 deletions

View File

@@ -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()