Then I tried create several Sky and fog Volumes and blend then by changing its weight. However this results in small glitch (when new volume is getting higher priority I believe).
So is there any other way how to animate parameters of Sky and Fog Volume in HDRP?
Thank you
Make a MonoBehaviour with the values that you can access for sure, then just have them reflect into the non-monobehaviour API you need to actually access.
Sounds like a good idea. So I have referenced Sky and Fog volume (public UnityEngine.Rendering.Volume volume; ), but did not manage to access Fog override yet. I would like to change specifically its fog attenuation distance parameter. Could you give me some leads, please? I’m quite new in scripting.
Animating post process is tricky, since they are assets. This approach (animating the weight of a post process volume), while more limited, can be used effectively but getting the priorities correct can be tricky, Using ‘global’ (i.e. no volume attached) post process with highest priority and active when timeline is enabled works for simple effects.
Otherwise using a MonoBehaviour to change the parameters of a PostProcess asset will work, but will always change the values of that asset on disk, so that’s something to account for if you are using the PostProcess somewhere else in your application. You may want have the Monobehaviour create and use a clone of the asset if possible.