Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    6
    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)