- Home /
How to pass through custom shaderGUI Tiling and Offset material property to a URP shader graph shader
Hello,
I'm currently in progress of testing how to make a custom shaderGUI for a shader graph shader. Only issue I've run into so far is that the tiling and offset values in my inspector are not passing through to the shader graph shader values.
For example.
In my shader I have a texture called _MainTex.
In my shader GUI m_MaterialEditor.TextureScaleOffsetProperty( ShaderGUI.FindProperty("_MainTex", properties));
When I adjust the tiling and offset values in the inspector, the uvs don't change at all for the MainTexture.
My main texture is using UV0.
After looking at all Unity's material inspector and shader example codes, it appears this should work. Any idea what I'm missing?
I should also note my FIRST attempt was to make a material property (vector 4) and assign that as the property inside TextureScaleOffsetProperty() method. However that just locked all the tiling/ offset values in the material inspector to 0,0,0,0 and had no impact on the actual shader's tiling or offset values.