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