Hello, I am currently writing my own data generator which will generate the marching cubes data based off a pre-made model.
I am planning to accomplish this by first scanning the model in a seperate Unity scene, writing all the float data values to a file, and then at a seperate time, loading the values from the asset file and passing the floats data to the generator.
I am passing the float data as a NativeArray<float>.
So finally, my question: how to dispose of the NativeArray I created after the job is completed?
PS. Yes, I realize I am sort of creating an unnecessary step here by loading the float data to a multi-threaded job, only to return that same data, but at the moment I don't see another way of generating the marching cubes from a model.
Hello, I am currently writing my own data generator which will generate the marching cubes data based off a pre-made model.
I am planning to accomplish this by first scanning the model in a seperate Unity scene, writing all the float data values to a file, and then at a seperate time, loading the values from the asset file and passing the floats data to the generator.
I am passing the float data as a
NativeArray<float>
.So finally, my question: how to dispose of the NativeArray I created after the job is completed?
PS. Yes, I realize I am sort of creating an unnecessary step here by loading the float data to a multi-threaded job, only to return that same data, but at the moment I don't see another way of generating the marching cubes from a model.