Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


UnsafeUtilityExtensions

Provides utility methods for unsafe, untyped buffers.
Read time 1 minuteLast updated 12 days ago

Definition

public static class UnsafeUtilityExtensions

Static Methods

Method

Description

AddressOfReturns the address of a read-only reference.
AsRefReturns a read-write reference from a read-only reference. Useful when you want to pass an
in
arg (read-only reference) where a
ref
arg (read-write reference) is expected. Do not mutate the referenced value, as doing so may break the runtime's assumptions.
ReadArrayElementBoundsCheckedReads an element from a buffer after bounds checking.
WriteArrayElementBoundsCheckedWrites an element to a buffer after bounds checking.