Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Alive (at time of writing)

Timothy Klopotoski skinitimski

💭
Alive (at time of writing)
View GitHub Profile
View MySceneBehaviour.cs
using UnityEngine;
public class MySceneBehaviour: MonoBehaviour {
private static MySceneParams loadSceneRegister = null;
public MySceneParams sceneParams;
public static void loadMyScene(MySceneParams sceneParams, System.Action<MySceneOutcome> callback) {
MySceneBehaviour.loadSceneRegister = sceneParams;
sceneParams.callback = callback;
UnityEngine.SceneManagement.SceneManager.LoadScene("MyScene");