Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Access Shader Properties from ShaderGraph by script.

Discussion in 'Graphics Experimental Previews' started by Spy-Shifty, Apr 17, 2018.

  1. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    546
    Hi,

    do you plan some mecanism to create shader that we can manipulat by script?

    Well, with ShaderGraph you can define properties, but the internal name is some generic stuff.

    E.g. Name: DiffuseMap -> internal Name: Texture_CD6DDEE1 or something like that.

    Will you provide a way or handle this case, so that we can access the DiffuseMap by script?
    Code (CSharp):
    1. Material.SetTexture("_DiffuseMap", myTexture);
     
  2. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,653
    +1, Are there any progress in this direction?
     
  3. Spy-Shifty

    Spy-Shifty

    Joined:
    May 5, 2011
    Posts:
    546
  4. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,653