public static void UnBlurCamera(Camera camera) { if (camera == null) { return; } Effect.BlurOptimized blur = camera.gameObject.GetComponent <Effect.BlurOptimized>(); if (blur != null) { blur.enabled = false; } }
public static void BlurCamera(Camera camera) { if (camera == null) { return; } Effect.BlurOptimized blur = camera.gameObject.GetComponent <Effect.BlurOptimized>(); if (blur == null) { blur = camera.gameObject.AddComponent <Effect.BlurOptimized>(); blur.blurShader = Shader.Find("Hidden/FastBlur"); } blur.enabled = true; }