Hi,
I’m using the new Shader Graph Canvas UI setting and I’m encountering an issue where when my UI Image is displayed within the content of a Scroll Rect, I can’t access any property of my material to change the shader values.
This seems to be related to Stencil Masking that happens within the Scroll Rect?
Any idea if there’s something I can do about this?
Thanks
Hi @ArnoldRauers_Tinytouchtales,
thanks for reporting this. It looks like a bug.
You can always edit the material by selecting it in the Project Window. But it seems properties will only update when saving.
I asked engineering about it. I’ll keep you posted when I know more.
Thanks,
the moment I move my image out of the scroll rect content, values become accessible again, so it definitely has todo with the masking of the scroll rect.
@FredMoreau was there any movement on this? I am unable to edit a custom canvas shader graph at runtime, even when accessing properties and setting floats (which appear to be updated according to the getfloat method) there is no visual change. This only appears to be the case for canvas shader graphs
Hi @nirufekriarnold,
regarding your question,
I believe this may be due to how canvas materials are being updated.
If you need to change a graphic material at runtime, you should do it by implementing the IMaterialModifier interface. This allows you to get the modified material, make your changes and pass it along.
In the UGUI Shaders sample recently released, some of the custom components use this.
Hope this helps.