Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved SOLVED: Get shader graph parameter fails, set works

Discussion in 'Shader Graph' started by Tarrag, May 24, 2019.

  1. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    215
    I created a property Vector1 that is a float. I'm trying to get this value on runtime.

    I tried the below but get error:

    _material.GetFloat("_SplitValue");
    and
    _material.GetVector("_SplitValue");

    I can set it with SetFloat, but not get it.

    Guidance appreciated, cheers!

    (On shadergraph 5.6.1, Unity 2019.1.0f2)
     
  2. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    215
    can't delete thread - please ignore, worked _material.GetVector("_SplitValue");