Hi, I want to change weight of URP post-processing Volume for different states in my game, but I don’t see Volume in Type options (Project Settings) and I have all URP assemblies in Node library. Is it even possible to work with that in Visual Scripting?
Trying to figure this out myself and came across your post. Seems like we can’t access the UnityEngine.Rendering.Universal assembly required to grab the Volume at runtime? Did you figure out a solution? Anyone out there can provide some help?
Thanks!
Unfortunately I didn’t. Only thing I could “work” were URP 2D lights, but almost all of their nodes/blocks do absolutely nothing. I searched through forums, youtube and other sources, but nothing was even near solving this problem.
This is how you will proceed.
For Visualscripting package 1.6.0 and +
- Open the “Project Settings…” panel: Edit > Project Settings > Visual Scripting
- In the Node Library section, add Unity.RenderPipelines.Core.Runtime
- Click on the Regenerate Units button under the Node Library section.
- You will now be able to work with the properties that are in your Volume component. In this example, I have.
- GameObject MyScript, which contains the script and object variable that references to the Volume.
- GameObject Post-process Volume that contains the Volume component we want to interact with.
- This is the result.
Playing with those values is the easiest part of all. The tricky part will be when you want to work with components inside the Volume component, like changing the lens distortion.
Thank you sooo much! It’s working!
btw do you have anything useful for 2d lights? I have script, which should change angle of light (both inner and outer), color but it’s not doing anything (and I got no errors, warnings or other logs)
Part of my script:
I haven’t tried to work with 2d at the moment. Shouldn’t be to hard.
Look like you have an error with a variable not found.
I did a quick test with the light2D with the script at the same level as my light 2D component and it work well.
Are you still getting issues?
Fortunately I don’t have any issues. After inspecting all my player scripts I found few conflicts where light angles were changing a few times per frame so it was just my foolishness.
(As first thing I tried your test script and it was working while my player script wasn’t, then I checked everything.)
Nice to ear, fortunately, in the future, we should have better graph debugging tools to help us find issues faster and more easily.
Hello,
Could you please provide more details on this part?
What is the Volume script you are using?
(I am not a programmer, I don’t know how to create that script. Also, I am using HDRP, so I added Unity.RenderPipelines.HighDefinition.Runtime.)
Thank you
Has anyone figured out the tricky part by any chance?