Class NativeReferenceUnsafeUtility
NativeReference<T> unsafe utilities.
Namespace: Unity.Collections.LowLevel.Unsafe
Syntax
public static class NativeReferenceUnsafeUtility : object
Methods
GetUnsafePtr<T>(NativeReference<T>)
Retrieve the data pointer of this container and check for write access.
Declaration
public static void *GetUnsafePtr<T>(this NativeReference<T> reference)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference container. |
Returns
Type | Description |
---|---|
Void* | The data pointer. |
Type Parameters
Name | Description |
---|---|
T | The type of the reference in the container. |
GetUnsafePtrWithoutChecks<T>(NativeReference<T>)
Retrieve the data pointer of this container without read/write access checks.
Declaration
public static void *GetUnsafePtrWithoutChecks<T>(NativeReference<T> reference)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference container. |
Returns
Type | Description |
---|---|
Void* | The data pointer. |
Type Parameters
Name | Description |
---|---|
T | The type of the reference in the container. |
GetUnsafeReadOnlyPtr<T>(NativeReference<T>)
Retrieve the data pointer of this container and check for read access.
Declaration
public static void *GetUnsafeReadOnlyPtr<T>(this NativeReference<T> reference)
where T : struct
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference container. |
Returns
Type | Description |
---|---|
Void* | The data pointer. |
Type Parameters
Name | Description |
---|---|
T | The type of the reference in the container. |