Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Cant set Shader float array values since 5.3.1

Discussion in 'Shaders' started by battou, Jan 18, 2016.

  1. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    145
    So I used to make float array[10] in shader and seting it's values using Shader.SetGlobalFloat("array"+i.ToString(),value) method. But in 5.3.1 it's not working. Is it expected, or it's a bug? Arrays of float3 are working though. 0_o
     
    Last edited: Jan 18, 2016
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,587
    Sounds like a bug. File it, and add details on which platform etc. it happens.

    By the way, in 5.4 there's "native" support for float arrays without the need for setting each entry individually.
     
  3. JonPQ

    JonPQ

    Joined:
    Aug 10, 2016
    Posts:
    81
    digging up old thread. but in ShaderGraph... I had same issue, until I realized its not the propertyname, but a second Reference name in ShaderGraph's Property settings you need to use. you can just rename those to match the property name as long as they are unique
     
unityunity