Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

urp set postprocessing value

UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent<UnityEngine.Rendering.Volume>()?.profile;
if(!volumeProfile) throw new System.NullReferenceException(nameof(UnityEngine.Rendering.VolumeProfile));
 
// You can leave this variable out of your function, so you can reuse it throughout your class.
UnityEngine.Rendering.Universal.Vignette vignette;
 
if(!volumeProfile.TryGet(out vignette)) throw new System.NullReferenceException(nameof(vignette));
 
vignette.intensity.Override(0.5f);
 
PREVIOUS NEXT
Tagged: #urp #set #postprocessing
ADD COMMENT
Topic
Name
4+4 =