Setting unitys new shader graphs properties via C#


My problem and what I tried

I'm currently trying to set a property in Unitys new shader graph via my c# script. I tried the below, but it didn't work.
            material.SetVector("Offset", new Vector2(xCoord, zCoord));

What I am doing

I'm trying to make a water effect. I'm currently using perlin, and than editing an offset to make waves. I than made a water shader (in unitys new shader graph tool), and would like to try and match it against the offset so that it looks more realistic. Any suggestions? It would be greatly appreciated.


Hello, You can access shader graph properties via c# script. Your code is true but the your property name is not offset, Unity’s Shader graph names properties randomly. You need to use these names that are in red circle in image. 116215-xdd.png

Hi there

Is it true that it is not possible to set a property from within shader graph?
= is it only possible to set from script?

Let say i need to store a temporary value - to offset something - then is it not possible inside shader graph?