private void InitRes() { if (!ShaderEffectUtils.CheckSupport()) { base.set_enabled(false); return; } if (!this.CreateMaterials()) { this.DestroyMaterials(); base.set_enabled(false); return; } this.m_PP_Holywood = base.get_gameObject().AddMissingComponent <PP_Holywood>(); this.m_PP_Holywood.Initialization(); this.m_PP_Vignette = base.get_gameObject().AddMissingComponent <PP_Vignette>(); this.m_PP_Vignette.Initialization(); this.UpdateRenderTextures(); }
private void EnableHolywood(bool isOn) { if (CamerasMgr.MainCameraRoot == null) { return; } if (isOn) { if (GameLevelManager.IsPostProcessReachQuality(250)) { if (this.m_PP_Holywood == null) { this.m_PP_Holywood = CamerasMgr.MainCameraRoot.get_gameObject().AddComponent <PP_Holywood>(); } this.m_PP_Holywood.set_enabled(isOn); this.m_PP_Holywood.Initialization(); } } else if (this.m_PP_Holywood != null) { this.m_PP_Holywood.set_enabled(false); } }