Function SpanExtensions.AsUnsafeReadOnlySpan
AsUnsafeReadOnlySpan<T>
(this NativeArray<T> arr)
Converts a NativeArray to a span, assuming it will only be read.
Public
Static
UnsafeSpan<T> AsUnsafeReadOnlySpan<T> (
this NativeArray<T> | arr |
Converts a NativeArray to a span, assuming it will only be read.
The span is a view of the array memory, so do not dispose the array while the span is in use.
Warning
No checks are done to ensure that you only read from the array. You are responsible for ensuring that you do not write to the span.