Our new developer documentation is now available. Please check it out!
CustomEffect<T>.Serialize
public static byte[] Serialize(T value)
public static IntPtr Serialize(T value, bool destroy = true)
Serialize structure to pointer for arbitary data T
Info
copy data for Marshal.StructureToPtr
Parameters
Name | Type | Description |
---|---|---|
value | <T> | data |
destroy | Boolean | free value |
Returns
Type | Description |
---|---|
Byte[] | byte array representation of data structure |
IntPtr | pointer of data structure |
Variants
Serialize(value)
public static byte[] Serialize(T value)
Serialize structure to pointer for arbitary data T
Warning
copy data for Marshal.StructureToPtr
Parameters
Name | Type | Description |
---|---|---|
value | <T> | data |
Returns
Type | Description |
---|---|
Byte[] | byte array representation of data structure |
Serialize(value, destroy)
public static IntPtr Serialize(T value, bool destroy = true)
Serialize structure to pointer for arbitary data T
Parameters
Name | Type | Description |
---|---|---|
value | <T> | data |
destroy | Boolean | free value |
Returns
Type | Description |
---|---|
IntPtr | pointer of data structure |