#Can't figure out how to disable Job container safety on pointed struct
1 messages · Page 1 of 1 (latest)
The thing is that the collection is within this custom struct,
But none of the nested collections have "WriteOnly" on it. What's going on?
you can't have native containers behind a pointer
the safety system can't see them
therefore it can't apply attributes to them / inject the correct values into the safety handle
an unset safety handle throws a writeonly exception (what you're seeing)
if you want to use containers behind a pointer they need to be the Unsafe variants, not Native (i.e. UnsafeList instead of NativeList)
that don't have safety handles
(it would work fine if storage wasn't a pointer)
I would store Native Collections in a separate structure and pass it to the Job by value