Class UnsafeUtility
Inheritance
UnsafeUtility
Syntax
public static class UnsafeUtility
Methods
AddressOf<T>(ref T)
Declaration
public static void *AddressOf<T>(ref T output)
where T : struct
Parameters
Type |
Name |
Description |
T |
output |
|
Returns
Type Parameters
AlignOf<T>()
Declaration
public static int AlignOf<T>()
where T : struct
Returns
Type Parameters
ArrayElementAsRef<T>(Void*, Int32)
Declaration
public static T ArrayElementAsRef<T>(void *ptr, int index)
where T : struct
Parameters
Returns
Type Parameters
As<U, T>(ref U)
Declaration
public static T As<U, T>(ref U from)
Parameters
Type |
Name |
Description |
U |
from |
|
Returns
Type Parameters
AsRef<T>(Void*)
Declaration
public static T AsRef<T>(void *p)
where T : struct
Parameters
Type |
Name |
Description |
Void* |
p |
|
Returns
Type Parameters
CopyPtrToStructure<T>(Void*, out T)
Declaration
public static void CopyPtrToStructure<T>(void *ptr, out T output)
where T : struct
Parameters
Type |
Name |
Description |
Void* |
ptr |
|
T |
output |
|
Type Parameters
CopyStructureToPtr<T>(ref T, Void*)
Declaration
public static void CopyStructureToPtr<T>(ref T input, void *ptr)
where T : struct
Parameters
Type |
Name |
Description |
T |
input |
|
Void* |
ptr |
|
Type Parameters
EnumEquals<T>(T, T)
Declaration
public static bool EnumEquals<T>(T a, T b)
where T : struct
Parameters
Type |
Name |
Description |
T |
a |
|
T |
b |
|
Returns
Type Parameters
EnumToInt<T>(T)
Declaration
public static int EnumToInt<T>(T value)
where T : struct
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
Type Parameters
ReadArrayElement<T>(Void*, Int32)
Declaration
public static T ReadArrayElement<T>(void *source, int index)
Parameters
Type |
Name |
Description |
Void* |
source |
|
Int32 |
index |
|
Returns
Type Parameters
ReadArrayElementWithStride<T>(Void*, Int32, Int32)
Declaration
public static T ReadArrayElementWithStride<T>(void *source, int index, int stride)
Parameters
Returns
Type Parameters
SizeOf<T>()
Declaration
public static int SizeOf<T>()
where T : struct
Returns
Type Parameters
WriteArrayElement<T>(Void*, Int32, T)
Declaration
public static void WriteArrayElement<T>(void *destination, int index, T value)
Parameters
Type |
Name |
Description |
Void* |
destination |
|
Int32 |
index |
|
T |
value |
|
Type Parameters
WriteArrayElementWithStride<T>(Void*, Int32, Int32, T)
Declaration
public static void WriteArrayElementWithStride<T>(void *destination, int index, int stride, T value)
Parameters
Type |
Name |
Description |
Void* |
destination |
|
Int32 |
index |
|
Int32 |
stride |
|
T |
value |
|
Type Parameters