void OnSceneChanged(Scene previous, Scene next) { previousScene = previous; current = FindObjectOfType <SceneBase>(); }
void Start() { SceneManager.activeSceneChanged += OnSceneChanged; instance = this; current = FindObjectOfType <SceneBase>(); }