MeshWriteData with NativeArray?

Hi,

We are implementing a strip chart with UIElments. Each strip consists of around 3000 data points, and we have more than 10 strips in one chart.

We are also trying to animate strips each frame for some visual effects.

We already have a pretty efficient solution that involves Job system from a previous project and we want to port the solution here.

The question we are facing right now is SetAllIndices, SetAllVertices method only takes c# arrays and converting large NativeArray to c# array is fairly expensive.

Is there a way for us to work around that?

Cheers!

1 Like

Hi,

This seems like an oversight from the team. I made a request to add more signatures to deal with native arrays. Thanks for the suggestion!

2 Likes

It may be too late at this point in the release cycle, but if these API’s can make 2019.3 that would be very useful to us.

1 Like

Ironically, the internal storage for index/vertex data is actually NativeArrays too (this is what MeshWriteData is internally wrapping). I’ll add the NativeArray signatures to MeshWriteData but I don’t think this will be available for 2019.3 as that train closed its doors for new features/APIs.

2 Likes