/* * Retains object that are not destroyed when scene load * Actual loading occurs in Fading script, else would not work as this is an event function */ public void ToNextLevel() { for (int i = 0; i < RetainedObjects.Count; i++) { DontDestroyOnLoad(RetainedObjects[i]); } int currentLevel = Application.loadedLevel; _sceneFader.FadeOut(); StartCoroutine(_writer.WriteNarration("")); StartCoroutine(_sceneFader.FadeToNextLevel(3f, currentLevel, _player, _cameraLead)); }