void TransitionFinalize(ScenesTransitionSetupDataSO ignored1, DiContainer ignored2) { try { if (!GetCurrentEnvironment().name.StartsWith("Menu")) { try { FindManager(); if (!Resources.FindObjectsOfTypeAll <PlayerDataModel>()[0].playerData.overrideEnvironmentSettings.overrideEnvironments) { InternalTempChangeToPlatform(); PlatformLoader.AddManagers(); SpawnCustomLights(); Instance.StartCoroutine(ReplaceAllMaterialsAfterOneFrame()); EnvironmentArranger.RearrangeEnvironment(); TubeLightManager.CreateAdditionalLightSwitchControllers(); } } catch (ManagerNotFoundException e) { Plugin.Log(e); } } else { Heart.SetActive(showHeart); Heart.GetComponent <LightWithId>().ColorWasSet(Color.magenta); } } catch (EnvironmentSceneNotFoundException e) { Plugin.Log(e); } }
private void HandleGameSceneLoaded() { gameEnvHider.FindEnvironment(); gameEnvHider.HideObjectsForPlatform(currentPlatform); EnvironmentArranger.RearrangeEnvironment(); TubeLightManager.CreateAdditionalLightSwitchControllers(); }
private void HandleGameSceneLoaded() { TubeLightManager.FixUnregisterErrors(); gameEnvHider.FindEnvironment(); gameEnvHider.HideObjectsForPlatform(currentPlatform); EnvironmentArranger.RearrangeEnvironment(); TubeLightManager.CreateAdditionalLightSwitchControllers(); //SceneDumper.DumpScene(); TubeLightManager.UpdateEventTubeLightList(); }
private void SceneManagerOnActiveSceneChanged(Scene arg0, Scene arg1) { envHider.FindEnvironment(); envHider.HideObjectsForPlatform(currentPlatform); if (SceneManager.GetActiveScene().name == "GameCore") { EnvironmentArranger.RearrangeEnvironment(); TubeLightManager.CreateAdditionalLightSwitchControllers(); TubeLightManager.UpdateEventTubeLightList(); } Camera.main.cullingMask &= ~(1 << CameraVisibilityManager.OnlyInThirdPerson); Camera.main.cullingMask |= 1 << CameraVisibilityManager.OnlyInHeadset; }