Search Unity

Resolved How to set global vector from script to a shader graph shader?

Discussion in 'Shader Graph' started by DAPPSD, Sep 19, 2019.

  1. DAPPSD

    DAPPSD

    Joined:
    Apr 26, 2018
    Posts:
    47
    Last edited: Sep 19, 2019
    DAE_KevDT, saint11 and Austin-Hummel like this.
  2. Levi-Burton

    Levi-Burton

    Joined:
    Jul 9, 2012
    Posts:
    10
    This caused issues for me as well. I wish it was documented somewhere. I had to do a *lot* of digging to figure this out, and marking it not exposed was counter-intuitive.
     
    Austin-Hummel and DAPPSD like this.
  3. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    It's always been this way. The same thing with hand-writing shaders/shaderlab- if you put an entry in the Properties block, you can't set global values for that prop. No idea why it's designed this way, but it is documented in the scripting reference.
     
    Austin-Hummel likes this.