UI Image with material works in scene mode, but black in game mode - Shader graph,Sprite is fully black in game view but not in scene view - Shader graph
So I'm basically using Shader Graph to create a moving texture. I have a unlit shader which moves the texture with some noise and it looks perfect in scene mode and preview mode of the shader graph.
But when i go into game view it becomes totally black. I've tried looking for answers everywhere, but can't seem to find a solution.
Answer by evannagel · Jun 13, 2019 at 11:06 AM
I've found a solution to this problem. It has to do with the Render mode of the parent canvas. Set the parent canvas to Screen Space - Camera instead of Screen Space- Overlay and it should be fixed.
Don't forget to attach the main camera!
Answer by SonIsaki · Feb 28, 2020 at 11:45 PM
I'm still having this issue with all packages up to date (29/02/2020) Setting the canvas mode to screen space camera isn't a solution but a trick
Is there any solution to fixed that bug ? Or is it just impossible to use shader graph in UI canvas ?
I have the same problem! (01/07/20, Unity version: 2019.3.15f1)
Have you tried to change the material of your image to something like "UI->Default" ? See my solution below..
Using UI/Default definitely fixes it, but the point was to use a custom shader. I did not want the Default shader. So reverting back to it wasn't a solution at all.
Answer by SAZ_1 · May 29, 2019 at 02:59 PM
Having the exact same problem... can someone from Unity confirm if this is a bug or just something we cannot do right now?
Answer by alont_unity · Mar 22, 2021 at 03:38 PM
The shader needs to be set as "transparent" rather than "opaque". This solves the issue for me.