Class NativeReferenceUnsafeUtility
Provides extension methods for NativeReference.
Namespace: Unity.Collections.LowLevel.Unsafe
Assembly: Unity.Collections.dll
Syntax
public static class NativeReferenceUnsafeUtility
Methods
GetUnsafePtrWithoutChecks<T>(NativeReference<T>)
Returns a pointer to this reference's stored value.
Declaration
public static void* GetUnsafePtrWithoutChecks<T>(this NativeReference<T> reference) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference. |
Returns
Type | Description |
---|---|
void* | A pointer to this reference's stored value. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |
Remarks
Performs no job safety checks.
GetUnsafePtr<T>(NativeReference<T>)
Returns a pointer to this reference's stored value.
Declaration
public static void* GetUnsafePtr<T>(this NativeReference<T> reference) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference. |
Returns
Type | Description |
---|---|
void* | A pointer to this reference's stored value. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |
Remarks
Performs a job safety check for read-write access.
GetUnsafeReadOnlyPtr<T>(NativeReference<T>)
Returns a pointer to this reference's stored value.
Declaration
public static void* GetUnsafeReadOnlyPtr<T>(this NativeReference<T> reference) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
NativeReference<T> | reference | The reference. |
Returns
Type | Description |
---|---|
void* | A pointer to this reference's stored value. |
Type Parameters
Name | Description |
---|---|
T | The type of the value. |
Remarks
Performs a job safety check for read-only access.