Quantcast
Viewing all articles
Browse latest Browse all 713

changing post processing effects realtime in 2019.3

I am trying to change the focus distance for depth of field through scripting. The code below used to work in previous versions. But now, it doesn't using UnityEngine.Rendering.PostProcessing; ... public Volume volume; DepthOfField dof; void Start() { volume.profile.TryGetSettings(out dof); dof.focusDistance.value = 1f; } But in 2019.3, I receive these errors: > VolumeProfile' does not contain a definition for 'TryGetSettings' and no accessible extension method 'TryGetSettings' accepting a first argument of type 'VolumeProfile' could be found

Viewing all articles
Browse latest Browse all 713

Trending Articles