Search Unity

  1. How has 2019.2 and the beta been for you so far? Give us feedback in this thread.
    Dismiss Notice
  2. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

I'm having trouble accessing ShaderGraph exposed properties through C# script

Discussion in '2018.1 Beta' started by theterrificjd, Apr 12, 2018.

  1. theterrificjd

    theterrificjd

    Joined:
    Oct 30, 2017
    Posts:
    4
    I've been able to do this with the Material.SetColor and SetVector functions, but I can't seem to get the material attributes to change, no matter how I name them.

    I figured I could look into the shader code to see what they are actually named and that they are publicly accessible, but I can't figure out how to do that either...
     
  2. Codyn6263

    Codyn6263

    Joined:
    Nov 23, 2016
    Posts:
    6
    I'm having the same issue, did you ever figure out how to do it?
     
  3. Codyn6263

    Codyn6263

    Joined:
    Nov 23, 2016
    Posts:
    6
    Forget my last post, i just figured it out. For anyone who visits this post looking for the same answer, click on your shader (NOT material, shader) and look in the inspector under where it says properties, it won't be what you named it but instead a jumbled mess like Color_E8FF20B3 or something similiar with what you named it on the right of that with the type of property (Color, Range, etc)
     
    Zion_MT, BenR, Macbainx and 2 others like this.