public void Awake() { if (loadSceneInputRegister != null) { sceneInputParams = loadSceneInputRegister; } loadSceneInputRegister = null; // the register has served its purpose, clear the state }
protected static void LoadMyScene(string sceneName, ISceneInputParams sceneInputParams, Action <ISceneOutputParams> callback) { loadSceneInputRegister = sceneInputParams; sceneInputParams.Callback = callback; UnityEngine.SceneManagement.SceneManager.LoadScene(sceneName); }