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.

Mesh IndexFormat.UInt32 Not Working (Pure ECS with Hybrid Rendering)

Discussion in 'Graphics for ECS' started by Yavvn, Jun 7, 2019.

  1. Yavvn

    Yavvn

    Joined:
    May 8, 2019
    Posts:
    18
    Currently using the latest stable release of Unity (2019.1.5f1) and related packages on MacOS. This issue applies to both the editor and MacOS builds. I have not had the chance to test this issue on Windows but it is likely cross-platform. This bug resulted in most of my day of productivity lost, so this thread is more a forewarning to others.

    The following code results in a hidden mesh and does not produce any errors or warnings.
    Code (CSharp):
    1. mesh.indexFormat = IndexFormat.UInt32;
    Mesh.indexFormat / IndexFormat.UInt32
     
  2. Yavvn

    Yavvn

    Joined:
    May 8, 2019
    Posts:
    18
    Does anyone have a workaround for this? Currently I'm unable to create a complex mesh with more than 65535 vertices as it doesn't appear to be automatically upgrading from the 16-bit index buffer either.

    Given that an entity can not have more than one RenderMesh component, I don't have a method of avoiding this.
     
  3. lordadamson

    lordadamson

    Joined:
    Jan 16, 2015
    Posts:
    1
    Have you found a solution?
     
  4. MNNoxMortem

    MNNoxMortem

    Joined:
    Sep 11, 2016
    Posts:
    723
    @Yavvn make sure to set the index format before you set triangles.