Struct ArrayCast
Union class for converting Array types from one type to another without copying.
Inherited Members
Namespace: Unity.SimulationPro
Assembly: Unity.SimulationPro.Capture.dll
Syntax
public struct ArrayCast
Methods
ToByte(Array)
Reinterprets the given array as a byte[] without copying.
Declaration
public byte[] ToByte(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| byte[] | The same memory viewed as a |
ToColor(Array)
Reinterprets the given array as a Color[] without copying.
Declaration
public Color[] ToColor(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| Color[] | The same memory viewed as a |
ToColor32(Array)
Reinterprets the given array as a Color32[] without copying.
Declaration
public Color32[] ToColor32(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| Color32[] | The same memory viewed as a |
ToFloat(Array)
Reinterprets the given array as a float[] without copying.
Declaration
public float[] ToFloat(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| float[] | The same memory viewed as a |
ToInt(Array)
Reinterprets the given array as an int[] without copying.
Declaration
public int[] ToInt(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| int[] | The same memory viewed as an |
ToShort(Array)
Reinterprets the given array as a short[] without copying.
Declaration
public short[] ToShort(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| short[] | The same memory viewed as a |
ToUShort(Array)
Reinterprets the given array as a ushort[] without copying.
Declaration
public ushort[] ToUShort(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| ushort[] | The same memory viewed as a |
ToVector2(Array)
Reinterprets the given array as a Vector2[] without copying.
Declaration
public Vector2[] ToVector2(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| Vector2[] | The same memory viewed as a |
ToVector3(Array)
Reinterprets the given array as a Vector3[] without copying.
Declaration
public Vector3[] ToVector3(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| Vector3[] | The same memory viewed as a |
ToVector4(Array)
Reinterprets the given array as a Vector4[] without copying.
Declaration
public Vector4[] ToVector4(Array a)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | a | The source array to reinterpret. |
Returns
| Type | Description |
|---|---|
| Vector4[] | The same memory viewed as a |