In the same system I create a NativeHashMap, pass it as NativeHashMap.AsParallelWriter()
and then read it as NativeHashMap. No errors but very strange results. Im i missing something here
var vertexColorMap = new NativeHashMap<int, int>(triangleBuildQueue.Count, Allocator.TempJob);
//JobParallelFor
FactoryJob = new FillNativeHashMap
{
//...
Output = vertexColorMap.AsParallelWriter() // [WriteOnly]
}
//JobParallelFor
FactoryJob = new ReadNativeHashMap
{
//...
Input = vertexColorMap // [ReadOnly]
}
It looks like the nativeHashMap changed somewhere unexpectedly and I want to check if passing my nativeHashMap with AsParallelWriter like the example above could be the culprit. I just want to sanity check than I have not gone off the yellow brick road here. Maybe so gotchas I’m not aware of when it comes to AsParallelWriter