Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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

Discussion in 'Graphics for ECS' started by optimise, Aug 14, 2023.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,068
    @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()
     
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    335
    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.
     
  3. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,068
    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?
     
  4. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    335
    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.
     
  5. gabrieloc

    gabrieloc

    Joined:
    Apr 6, 2014
    Posts:
    37
    Did you ever come to a resolution with this one?
     
  6. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,068
    Hi. You can check case IN-56116 for repro project
     
  7. gabrieloc

    gabrieloc

    Joined:
    Apr 6, 2014
    Posts:
    37
    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.
     
  8. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,068
    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?
     
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,068
    Hi @JussiKnuuttila. Any new update for this issue? This is quite serious issue that needs to prioritize the fix.