Example #1
0
        public static bool AddImageSpaceModifier(PostProcessProfile profile, float fadeIn, float duration, float fadeOut, AnimationCurve anim, float animCycle)
        {
            if (profile == null)
            {
                Debug.LogWarning("Add: Post Prcess profile is null");
                return(false);
            }

            if (ProfileIsActive(profile, out _))
            {
                Debug.LogWarning("Add: Post Prcess profile: " + profile.name + " is already active in an image space modifier");
                return(false);
            }


            ImageSpaceModifier mod = pool.GetAvailable(null, true);

            activeModifiers.Add(mod);
            mod.InitializeModifier(profile, fadeIn, duration, fadeOut, anim, animCycle, activeModifiers.Count);
            // Debug.Log("Adding profile: " + profile.name);
            return(true);
        }