HDRP some objects don't render in the build

Hello guys,

Before I was using Unity 2018.3.12f1 and everything was working perfectly. After updating Unity to 2019.1 everything works perfectly in the editor but as soon as I build the project some objects don’t render(appear) in the scenes. All the objects are using Lit Shader.

Has anyone experienced this problem, is there anyone here that know what the problem could be?

I would appreciate any input, since I have been pulling my hair for a whole week and I can’t find the problem.

Regards,
Carlos

I ran into this problem as well. What’s happening is that some objects being batched by the SRP Batcher doesn’t render but when you switch it off everything works fine.

Never mind, I found it! Thank you so much! I will try this and hopefully it will fix the problem that had me almost crazy.

Thanks so much for your input Grimreaper358. Where do you switch off the SRP Batcher? in the materials or the HDRP profile?

Regards,
Carlos

You can disable it on the HDRP asset. There’s also a profiler script that you can use to enable and disable SRP Batcher at runtime but it never works for me for some reason.

You can find more information about the SRP Batcher here

I use the version below. This one doesn’t show statistics except for FPS and if the Batcher is on or not.

4454716–408646–MiniProfiler.cs (7.08 KB)

Hello Grimreaper,

Reading the blog, I realized that this only works from 2019.2 up, that is probably why the problem happened in my game, I am using 2019.1 because that is the latest version available for Xbox One projects. So I will have to wait until they make 2019.2 available for my platform in order to use this feature.

Thank you so much for your great help! I appreciate it very much.

Regards,
Carlos