- Home /
Question by
MasterN1 · Mar 06, 2020 at 03:08 PM ·
scripting problempost processing
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
Comment
Your answer
Follow this Question
Related Questions
Script To Update Post Process Profile At Runtime [2018 HDRP] 1 Answer
Lens Distortion does not do anything when changed through script 1 Answer
(Problem) Turning postprocessing on and off 0 Answers
Get Camera Current Post Profile Name 0 Answers
How can i change post processing at run time using if statements 2 Answers