private void SetShaderForSecsEx(Material mat, float time, PostEffectImage component)
 {
     if (mat != null)
     {
         component.PostEffectMaterial  = mat;
         _defautShaderShouldBeRestored = Time.fixedTime + time;
     }
 }
Exemple #2
0
        void OnTriggerEnter(Collider other)
        {
            if (PostEffectMaterialAfterPicking.HasProperty("_TimeStarted"))
            {
                PostEffectMaterialAfterPicking.SetFloat("_TimeStarted", Time.time);
            }

            PostEffectImage.SetShaderForSecs(PostEffectMaterialAfterPicking, SecondsOfShaderEffect);
        }