void RemoveSettingIfOption <T>(PostProcessProfile profile, Option option) where T : PostProcessEffectSettings
 {
     if (!option.Get <bool>() && profile.HasSettings <T>())
     {
         profile.RemoveSettings <T>();
     }
 }
예제 #2
0
        private static void DisableEffect <T>(PostProcessProfile profile) where T : PostProcessEffectSettings
        {
            if (!profile.HasSettings <T>())
            {
                return;
            }

            profile.RemoveSettings <T>();
        }
예제 #3
0
    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>();
 }