Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to get "enabled" or "active" from a VolumeComponent

Discussion in 'Universal Render Pipeline' started by F4talis, Dec 7, 2023.

  1. F4talis

    F4talis

    Joined:
    Apr 18, 2019
    Posts:
    6
    In the image below, I have my VolumeComponent. It is clearly unchecked, and greyed out, but I cannot for the life of me find a reference to that check box in code to CHECK if it's disabled.

    I've resorted to adding an "IsActive" BoolParameter as seen below, but I dislike this approach for 2 reasons:
    First off, the BoolParameter has two checkboxes basically meaning "Am I using this parameter?" and "What is it's value?"
    Secondly, I would like to KEEP this bool parameter as a shutoff. Basically, there are default settings I have set up for my volume, and when the outline component is NOT on the volume stack, I use the default settings (which include if it should be on or off by default).

    Issue is that I'd like to check "if the volume component is NOT enabled, then check the default settings to see if it should be active by default", but unlike regular components, which when you check or uncheck their box and the component is greyed out (like in the picture) and have an "isActiveInHeiarchy" or "enabled", there is nothing on the VolumeComponent (that I can find) to let me know is that box checked.
    upload_2023-12-7_11-15-18.png
     

    Attached Files:

    HarutL likes this.