(IN-56116) [1.0.14] Registering mesh null at index x inside a RenderMeshArray failed.

@JussiKnuuttila Currently Entities Graphics still not really stable and reliable enough to stream ecs graphics content from subscene. Sometimes it will just fail to stream subscene that just black without rendering any ecs graphics content properly from the subscene and then keep logging the following same warning.

Registering mesh null at index 109 inside a RenderMeshArray failed.
Unity.Rendering.RegisterMaterialsAndMeshesSystem:RegisterMaterialsAndMeshes(JobHandle)
Unity.Rendering.RegisterMaterialsAndMeshesSystem:OnUpdate()
Unity.Entities.SystemBase:Update()
Unity.Entities.ComponentSystemGroup:UpdateAllSystems()
Unity.Entities.SystemBase:Update()

Was there an error when baking this subscene? Null meshes inside RenderMeshArrays are definitely not expected, and I think the Entities Graphics baking should attempt to avoid it.

If the subscene was baked correctly and there is no null in the Editor, then it is possible there is some kind of bug in the subscene streaming and loading.

No issue at editor. It’s only happen at player runtime that both android and windows get the same issue that I believe it’s reproducible at all platforms. Is that player runtime goes to different subscene streaming code path?

I don't know how the streaming works (it's not part of Entities Graphics), but it certainly sounds like this might be a bug. I would recommend filing a bug report with a repro project and repro instructions.

Did you ever come to a resolution with this one?

Hi. You can check case IN-56116 for repro project

FWIW this is what I'm doing to experience the issue:

  1. Load scene A containing a subscene with many prefabs
  2. Create a new World inside scene A and copy prefabs to new world
  3. Present scene B and instantiate said prefabs

I'm not sure if that sequence of events alone is enough to produce the issue, but the outcome is the same and exclusive to standalone builds. I've tried various combinations of reattaching the RenderMeshArray shared component to the copied mesh prefabs at different points to no avail. The meshes and materials inside RenderMeshArray are also non-null until I switch scenes, so there may also be an entity with a managed component attached that I need to copy over as well (I'm only copying entities containing the Prefab component). I've tried also copying all entities to my new world but that caused all kinds of other problems as I'm using Netcode and it manages a bunch of its own entities.

Hi @Fabrice_Lete . Not sure it’s related to this bug or not for entity store but looks like it’s fixed at 1.2.0-exp.3 with define ENTITY_STORE_V1. Can u make sure next 1.2.0 release without define will also fix this bug?

Hi @JussiKnuuttila . Any new update for this issue? This is quite serious issue that needs to prioritize the fix.

Hello. I've been investigating this issue. I'm sorry it's taking a while but the investigation is not trivial. Just to clarify, is this happening when using streaming sections? We've received a bug report where the issue does reproduce but we also have a nearly identical test scene where this doesn't happen. I've redirected the bug to the right team and I'm waiting on any update from them. I'll update here as soon as I have some news.

1 Like

Ya. When there are multiple game objects have SceneSectionComponent authoring added at subscene. The bug report u mentioned I believe is case IN-60915 that all SceneSectionComponent authoring have been removed to reproduce another global entity store bug at 1.2.0-exp.3 release.