I have manipulated post processing profiles at runtime previously with no problem. Now I'm using:
- Unity 2018.4.28f1
- Post Processing Stack v2 3.0.1
- High Definition Render Pipeline (HDRP) 4.10.0
Main Camera has a Post Process Layer and Post Process Volume:
![alt text][1]
When entering play mode, the Profile becomes an instance:
![alt text][2]
According to documentation, this is an "Owned Profile":
*Changes will only be applied to the specified volume
Resets when you exit play mode
It is your responsibility to destroy the profile when you don't need it anymore
Field name: profile*
volume.profile.TryGetSettings(out ambientOcclusion)
and
volume.sharedProfile.TryGetSettings(out ambientOcclusion)
both return true.
**Trying to modify any post profile effect fails:**
ambientOcclusion.intensity.value = 1f;
How can I change a post processing effect at runtime using Unity 2018.4.28 with HDRP and PP stack v2 3.0.1?
![alt text][3]
[1]: https://i.postimg.cc/4xqs926Y/Post-Process-Problem1.jpg
[2]: https://i.postimg.cc/rmLdSw-1R/Post-Process-Problem2.jpg
[3]: https://i.postimg.cc/cJDFkPJm/Post-Process-Problem3.jpg
↧