Closed ghost closed 2 years ago
@xraxra is this still happening? I think I have fixed a number of issues around how the gradients dictionary works and where it stores data and it should be way more robust now. If you can still reproduce, would be great if you post the version here :) Thanks!
This should be fixed for a while now, please open a new issue if this is still relevant. Thanks!
I'm using shadergraph markdown on regular shader files, which might be why this isn't working, but it seems like it could work.
When using a gradient drawer, the MarkdownShaderGUI initially sees that the gradient texture property is not set (possibly because ShaderGraph assigns default unity textures), and on line 477 conditionIsFulfilled is false, then since debugConditionalProperties is usually disabled, it hits continue at line 482 and skips drawing the GradientDrawer (so it is not possible to create or assign the gradient texture to begin with).
If I enable debugConditionalProperties, it then draws the gradient drawer, but the Dictionary has not been created yet, so it hits a null reference exception within OnDrawerGUI
It looks like the dictionary is created in OnAfterDeserialize but I haven't been able to figure out how to hit a breakpoint in there (from modifying the material & saving project)