DOTS render issue; all SubScene meshes are pink/magenta

I’m using an asset I got on the store a while back (recently updated) and as I am using DOTS I’d like to have these assets spawn in and be managed inside the a subscene with the other entities.

The assets (Stars/Planets etc) render ok when just in a regular scene, and as long as the subscene is active (‘Live Converted’?) the assets render ok there also.

However as soon as I close the subscene the assets do not render correctly and the materials are missing (Pink) but no errors.

Now I did have to do some jiggery-pokery with some shaders because the shaders didn’t seem to work with DOTS (#pragma target 3.0 instead of 4.5, and then complaining of some missing property defs - again ONLY when I tried rendering the objects in a subscene) so its entirely possible that whilst I fixed the errors and removed the console logs. That the shader is in fact broken. But I’m not certain.

Was hoping to get some insight into how I can resolve this. The shaders were converted using an older version of BetterShaders, but I can’t find any information on whether the latest version (targeting the same Unity version I’m using - 2022.3 LTS) will fix the shader problems.

Opened SubScene is rendered by your default GameObject renderer. Closed SubScene loads converts/loads them as entities and renders them instead. Entities are rendered by Entities Graphics rendering system (called “Hybrid Renderer” in the past).

https://docs.unity3d.com/Packages/com.unity.entities.graphics@1.0/manual/index.html

One of the Entities Graphics’ requirements is that your shaders needs to support Scriptable Render Pipeline (SRP) to be rendered properly or at all.

src: Requirements and compatibility | Entities Graphics | 1.0.16

Render pipeline Compatibility
Built-in Render Pipeline Not supported
High Definition Render Pipeline (HDRP) Unity 2022 LTS
Universal Render Pipeline (URP) Unity 2022 LTS

This means that if your shader was written for Built-in Render Pipeline (all old shaders are in this group) then it will fail to compile properly and result in pink “error” shader displayed instead.

You can test this by adding a SRP-compatible (URP and HDRP are in this group) shader to these meshes and seeing if that renders properly.