I want to change the intensity value of a bloom effect in a script in unity2D using Universal Render Pipeline.
I tried looking in the URP Bloom manuals and even unitys bloom manuals and found no result, i watched some YT tutorials and none explained how to refrence only the intensity value of a Bloom effect in script. Any help would be appriciated!
First obtain a reference to the
PostProcessVolume
.Then try to get the bloom settings from the profile.
Now you can modify the bloom properties.
For URP
namespaces
Volume
Bloom component
Intensity
IMPORTANT NOTE from the author of the question: for this problem the error was due to the GetComponent function trying to get the volume from itself while the volume was in a different game object, to solve this problem the final code on that line was: