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 bool InitResources() { if (this.m_shaderNames.get_Count() == 0 || this.m_materials.get_Count() > 0) { return(true); } if (!ShaderEffectUtils.CheckSupport()) { base.set_enabled(false); return(false); } if (!this.CreateMaterials()) { this.DestroyMaterials(); base.set_enabled(false); return(false); } this.GetMaterials(); return(true); }