02-05-2024, 06:53 PM
(This post was last modified: 02-05-2024, 06:58 PM by josemendez.)
(02-05-2024, 06:16 PM)spikebor Wrote: I found a culprit.
This Shader "Obi/URP/Fluid/FluidShading" is added to the AlwaysIncludedShaders list, but somehow still be skipped from build.
The result is this code still create a null material.
Code:if (fluid_Material == null) fluid_Material= FluidRenderingUtils.CreateMaterial(Shader.Find("Obi/URP/Fluid/FluidShading"));
Hi Spikebor,
Open up that shader file and change its “UniversalRenderPipeline” tag to “UniversalPipeline”. Some URP versions use the former, while others use the latter (just for fun, I suppose :/).
Using the incorrect tag will still work in the Editor, but will silently fail in builds. This is a bug in Unity that hasn’t been addressed yet.
Let me know whether this works for you, or if you need further help.
Kind regards.