Fully async scene management

This commit is contained in:
2025-06-05 13:41:16 -07:00
parent fac435df75
commit 395bf1cb5b
5 changed files with 9 additions and 9 deletions

View File

@@ -8,8 +8,8 @@ public class ButtonToScene : MonoBehaviour
void Awake()
{
gameObject.GetComponent<Button>().onClick.AddListener(() => {
SceneManager.LoadSceneAsync(sceneName);
gameObject.GetComponent<Button>().onClick.AddListener(async () => {
await SceneManager.LoadSceneAsync(sceneName);
});
}
}