Mesh API Arguments and Options

I am looking into porting some plotting code from GL to the Mesh API.

What is the current recommend approach to draw simple lines? I intend for the look of a default Matlab plot.

I found this example of generating a mesh:

This code has some weirdness to it. Namely

var md = mgc.Allocate((int)wantedLength, (int)indexCount, null, null, MeshGenerationContext.MeshFlags.UVisDisplacement);

// ...

Color32 flags = new Color32(0, 0, 0, (byte)VertexFlags.LastType);

// ... 
md.SetNextVertex(new Vertex() { position = new Vector3(pos.x, pos.y, 1), uv = uv, tint = tint, idsFlags = flags });

I can’t find that overload of Allocate or Vertex with idsFlags.

This is notable a experimental element in the ref. source.

The mesh api, while really powerful, is not yet recommended for development. The data in each vertex need to conform to the expectation of the shader and a lot of (undocumented) features are intertwined.

Because of this, the api is still experimental and subject to breaking changes.

The allocate method is in UIRMeshGenerationContext.cs