change vignette intensity in script unity code example
Example 1: how to edit postprocessing through script
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
var volume = target.GetComponent<Volume>();
if (volume.profile.TryGet<Bloom>(out var bloom))
{
bloom.intensity.overrideState = true;
bloom.intensity.value = 2f;
}
Example 2: change vignette intensity unity
DOTween.To(() => vignette.intensity.value = 0.7f, x => { vignette.intensity.value = x; }, 0f, 1f).SetLoops(5,LoopType.Restart);