Tom Wor

Professional web developer and indie game creator. Passionate about autonomy for creative professionals, true ownership and permissionless technology.

Using Unitys Asyncoperation Completed With Anonymous Callback Function

Nov 11, 2018 — 1 min read

Say you want to load a scene asynchronously and need to trigger an event right after the scene has loaded, a quick two-liner does the job.

AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(this.DefaultLevel, LoadSceneMode.Additive);
asyncLoad.completed += operation => MessageDispatcher.SendMessage("MENU_START");
To Homepage