Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

Bug [1.1.0-exp.1] RenderMesh uses wrong materials during baking with submesh sharing.

Discussion in 'Graphics for ECS' started by DreamingImLatios, Oct 11, 2023.

  1. DreamingImLatios


    Jun 3, 2017
    Using Entities.Graphics 1.1.0-exp.1 with ENABLE_MESH_RENDERER_SUBMESH_DATA_SHARING defined. There are two GameObjects in the subscene named DualMatBlock, each having a mesh with two submeshes. Both blocks have the same material for the first slot. However, they have different materials for the second slot (red vs blue).


    When baking these two GameObjects, both objects end up looking identical, when they should look different because one of the materials is different.

    The reason this happens is that RenderMesh shared component equality only compares the first material slot when submesh sharing is enabled. This should compare all materials.

    Last edited: Oct 11, 2023
  2. VincentBreysse


    Unity Technologies

    May 31, 2021
    Looks like a great catch. We'll try to address this soon. Thanks for the report!