Gist b44b034e2ab3689f897d3c0d9d41569a
✓ Published0🌍 Public
Aandybak
Last edited May 25, 2018
Created on May 25, 2018
This example shows a Unity script that animates a post-processing vignette effect on a camera, smoothly fading its intensity in or out based on a boolean input. The code uses the DOTween tweening library to interpolate a `vignIntensity` field over a specified duration, while a `PostProcessingBehaviour` component references its attached `PostProcessingProfile` to update the vignette settings in real time. The animation updates the profile’s `VignetteModel.Settings` each frame, and on completion clears the tween reference. The script reads the profile directly from the camera’s behavior, making it suitable for runtime effects.
AI-generated description