New answers tagged

0

Just for reference I ended doing this in my game controller: void Start() { DontDestroyOnLoad(gameObject); } void OnEnable() { SceneManager.sceneLoaded += OnSceneLoaded; } void OnDisable() { SceneManager.sceneLoaded -= OnSceneLoaded; } public void MoveToNextScene(string sceneName, ExitType exitType) { _lastExitType = exitType; ...


0

This appears to be a bug wherein even a keyboard polling gameObject loses track of second keypresses across scene loads. One workaround is to keep a minimal main level that keeps track of all the inputs, scores, handles basic mechanics etc, and loads and unloads scenery overlays additively, so those controllers always persist. Here's a simplistic script that ...


Top 50 recent answers are included