Search Unity

No exposure to VisualEffect's Renderer parameters like Light Probes and Transparency priority.

Discussion in 'VFX Toolbox' started by NTG-SAnderson, Nov 15, 2019.

  1. NTG-SAnderson

    NTG-SAnderson

    Joined:
    Sep 13, 2019
    Posts:
    3
    These 3 fields at least:
    m_LightProbeUsage
    m_ProbeAnchor
    m_LightProbeVolumeOverride

    Need to be properly exposed as instantiation of a VisualEffect at runtime needs to have the appropriate blend volume or probe anchor assigned and there is no way to configure these without reflection.

    I was expecting these to be exposed like the shuriken particle system as VisualEffect.renderer.<vars> but they're simply not exposed. We should not be expected to leverage reflection to set values that are exposed in the editor.
     
  2. NTG-SAnderson

    NTG-SAnderson

    Joined:
    Sep 13, 2019
    Posts:
    3
    Correction, I cannot seem to expose these properties through reflection regardless...
    Again, why aren't these public variables?
     
  3. ThomasVFX

    ThomasVFX

    Unity Technologies

    Joined:
    Jan 14, 2016
    Posts:
    32
    Hello,

    Did you try accessing these using the following?

    Code (CSharp):
    1. GetComponent<Renderer>().lightProbeUsage
    2. GetComponent<Renderer>().probeAnchor
    3. GetComponent<Renderer>().lightProbeProxyVolumeOverride
    The reason of not making these variables is the underlying Visual Effect Renderer is hidden as some config has moved to the graph (shadows, ...) and is set implicitly by the Visual Effect, depending on the graph asset being played.

    However, the values you want to set can still be accessed through access to the abstract Renderer component interface.
     
unityunity