📜  urp 设置后处理值 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:03.894000             🧑  作者: Mango

代码示例1
UnityEngine.Rendering.VolumeProfile volumeProfile = GetComponent()?.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);