Materials(custom shaders) are invalid(magenta) when I'm loading them from Resources

I have custom shader graphs and materials, which use them. All my materials are stored in the Resources and I’m loading them and assign to renderers while runtime. And all materials, I loaded, are not displayed correctly.

My guess is, that my shaders are not being loaded on materials loading. I think so, because of next workarounds, I found.

The first workaround is to assign my materials to some objects in my scene to make them be displayed and being loaded on scene opened.
The second workaround is to add my shader graphs to “Always Included Shaders” at “Project Settings” > “Graphics”.

1 Like

Glad you found workarounds! I would expect this to be fixed in our next release by a change that we’re adding to support shader graphs in asset bundles, but please let us know if it isn’t fixed after the next release.