/////////////////////////////////////////////////////////////// OnSceneFinishedLoading () ///////////////////////////////////////// void OnSceneFinishedLoading(Scene scene, LoadSceneMode mode) { int newSceneIdx = scene.buildIndex; currentScene = newSceneIdx; Debug.Log("Game Manager -> Scene Loaded: idx=" + newSceneIdx + ", name=" + scene.name + ", loadMode=" + mode); Bloom bloomLayer; ppProfile.TryGetSettings(out bloomLayer); if (newSceneIdx > CREDITS) // -- Level Loaded -- { //prepare GameObjects in _Base for Gameplay. Ex: Activate player. if (!player.activeInHierarchy) { player.SetActive(true); } bool clearBoxes = false; if (playerDied || newFloor) { clearBoxes = true; } playerManager.ResetPlayer(clearBoxes); lvlManager = GameObject.Find("LevelManager").GetComponent <LvlManager>(); lvlManager.InitLevel(this, lastSceneName, playerDied); //post processing bloomLayer.intensity.value = 63f; bloomLayer.threshold.value = 1.6f; bloomLayer.softKnee.value = 0.7f; //Level Specific if (newSceneIdx == FLOOR_1) { GameObject.Find("Protagonist_v6").GetComponent <PlayerSound>().BossMusic(); } if (floorList.Contains(newSceneIdx)) { PlayerPrefs.SetInt("UnlockedFloor", currentScene); } } else if (newSceneIdx == CREDITS) // -- Credits Screen Loaded -- { //post processing bloomLayer.intensity.value = 1f; bloomLayer.threshold.value = 0.4f; bloomLayer.softKnee.value = 0f; if (player.activeInHierarchy) { player.SetActive(false); } } playerDied = false; }