I’m trying to call UnsafeUtility.MemCpy(), and I’m using NativeSlice on the [ReadOnly] array.
Unfortunately this seems to trigger the exception “InvalidOperationException: The native container has been declared as [ReadOnly]”
Is this a bug, or am I misunderstanding what Slice is doing?
note: as a workaround I’m just using [NativeDisableContainerSafetyRestriction] and everything seems fine, just seems like a bug that [ReadOnly] doesn’t work and I worry if any optimizations are disabled from doing this.