Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Obi Fluid 6 not render on Window build
#1
Hi, I have this bug when test build on PC Window the Obi Fluid
Obi Fluid 6.5.4, works well on Editor using the Obi/URP/Particles.shader, but not work on PC build (x64 window).
Unity URP 2022.3.16f1
Do I miss any setup step?

Log:
Code:
Particle rendering shader not suported.
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:LogWarning(Object)
Obi.ObiParticleRenderer:CreateMaterialIfNeeded()
Obi.ObiParticleRenderer:DrawParticles(ObiActor)
Obi.ObiActor:Interpolate()
Obi.ObiSolver:Interpolate(Single, Single)
Obi.ObiUpdater:Interpolate(Single, Single)
Obi.ObiFixedUpdater:Update()

--Stack Trace--
Obi Fluid Renderer not supported in this platform.
UnityEngine.Debug:LogWarning(Object)
Obi.ObiFluidRendererFeature:AddRenderPasses(ScriptableRenderer, RenderingData&)
UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal(RenderPipelineAsset, IntPtr, Object)
Reply
#2
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"));
Reply
#3
(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.
Reply
#4
(02-05-2024, 06:53 PM)josemendez Wrote: 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.

Thank you! It rendered now.
Are those 3 shaders in the URP folder are the only ones I need to change?
Wow, that Tag change the URP team made is not fun, they really hate those who writes shaders in text Enfadado
Reply