Skip to content

Instantly share code, notes, and snippets.

View skinitimski's full-sized avatar
💭
Alive (at time of writing)

Timothy Klopotoski skinitimski

💭
Alive (at time of writing)
View GitHub Profile
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");