void RemoveSettingIfOption <T>(PostProcessProfile profile, Option option) where T : PostProcessEffectSettings { if (!option.Get <bool>() && profile.HasSettings <T>()) { profile.RemoveSettings <T>(); } }
private static void DisableEffect <T>(PostProcessProfile profile) where T : PostProcessEffectSettings { if (!profile.HasSettings <T>()) { return; } profile.RemoveSettings <T>(); }
PostProcessProfile CustomCopyProfile(PostProcessProfile file) { if (file.settings == null || file.settings.Count < 1) { return(null); } PostProcessProfile ret = Object.Instantiate(file); //remove old ret.RemoveSettings <ColorGrading>(); var newOne = ret.AddSettings <ColorGrading>(); newOne.active = false; return(ret); }
private void OnDestroy() { postProcess.RemoveSettings <ChromaticAberration>(); }