GetSpanUnsafe Method
- Namespace
- SatorImaging.UnityFundamentals
GetSpanUnsafe(int, out Span<T>) Deprecated
[Obsolete("Use `Write()` instead")]
public ref Range GetSpanUnsafe(int index, out Span<T> fullRangeSpan)
This method returns direct reference to internal array item. You can trim or extend range by editing that.
> [!WARNING] > You need to be familiar with C#'s `ref return` language feature.
// basic usage
spanList.GetSpanUnsafe(i, out var span).SetLength(WriteToBuffer(span, data));
> [!CAUTION]
> `ref Range` modification will have never been validated by this library.