Struct NativeArray<T>
Syntax
public struct NativeArray<T> : IDisposable, IEnumerable<T>, IEnumerable, IEquatable<NativeArray<T>> where T : struct
Type Parameters
Constructors
NativeArray(T[], Allocator)
Declaration
public NativeArray(T[] array, Allocator allocator)
Parameters
Type |
Name |
Description |
T[] |
array |
|
Allocator |
allocator |
|
NativeArray(Int32, Allocator, NativeArrayOptions)
Declaration
public NativeArray(int length, Allocator allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
Parameters
NativeArray(NativeArray<T>, Allocator)
Declaration
public NativeArray(NativeArray<T> array, Allocator allocator)
Parameters
Properties
IsCreated
Declaration
public bool IsCreated { get; }
Property Value
Item[Int32]
Declaration
public T this[int index] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Length
Declaration
public int Length { get; }
Property Value
Methods
AsReadOnly()
Declaration
public NativeArray<T>.ReadOnly AsReadOnly()
Returns
Copy(T[], Int32, NativeArray<T>, Int32, Int32)
Declaration
public static void Copy(T[] src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
Copy(T[], NativeArray<T>)
Declaration
public static void Copy(T[] src, NativeArray<T> dst)
Parameters
Copy(T[], NativeArray<T>, Int32)
Declaration
public static void Copy(T[] src, NativeArray<T> dst, int length)
Parameters
Copy(NativeArray<T>, T[])
Declaration
public static void Copy(NativeArray<T> src, T[] dst)
Parameters
Copy(NativeArray<T>, T[], Int32)
Declaration
public static void Copy(NativeArray<T> src, T[] dst, int length)
Parameters
Copy(NativeArray<T>, Int32, T[], Int32, Int32)
Declaration
public static void Copy(NativeArray<T> src, int srcIndex, T[] dst, int dstIndex, int length)
Parameters
Copy(NativeArray<T>, Int32, NativeArray<T>, Int32, Int32)
Declaration
public static void Copy(NativeArray<T> src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
Copy(NativeArray<T>, NativeArray<T>)
Declaration
public static void Copy(NativeArray<T> src, NativeArray<T> dst)
Parameters
Copy(NativeArray<T>, NativeArray<T>, Int32)
Declaration
public static void Copy(NativeArray<T> src, NativeArray<T> dst, int length)
Parameters
CopyFrom(T[])
Declaration
public void CopyFrom(T[] array)
Parameters
Type |
Name |
Description |
T[] |
array |
|
CopyFrom(NativeArray<T>)
Declaration
public void CopyFrom(NativeArray<T> array)
Parameters
CopyTo(T[])
Declaration
public void CopyTo(T[] array)
Parameters
Type |
Name |
Description |
T[] |
array |
|
CopyTo(NativeArray<T>)
Declaration
public void CopyTo(NativeArray<T> array)
Parameters
Dispose()
Declaration
Dispose(JobHandle)
Safely disposes of this container and deallocates its memory when the jobs that use it have completed.
Declaration
public JobHandle Dispose(JobHandle inputDeps)
Parameters
Returns
Type |
Description |
JobHandle |
A new job handle containing the prior handles as well as the handle for the job that deletes
the container.
|
Remarks
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
Equals(NativeArray<T>)
Declaration
public bool Equals(NativeArray<T> other)
Parameters
Returns
GetEnumerator()
Declaration
public NativeArray<T>.Enumerator GetEnumerator()
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
GetSubArray(Int32, Int32)
Declaration
public NativeArray<T> GetSubArray(int start, int length)
Parameters
Returns
Reinterpret<U>()
Declaration
public NativeArray<U> Reinterpret<U>()
where U : struct
Returns
Type Parameters
Reinterpret<U>(Int32)
Declaration
public NativeArray<U> Reinterpret<U>(int expectedTypeSize)
where U : struct
Parameters
Type |
Name |
Description |
Int32 |
expectedTypeSize |
|
Returns
Type Parameters
ReinterpretLoad<U>(Int32)
Declaration
public U ReinterpretLoad<U>(int sourceIndex)
where U : struct
Parameters
Type |
Name |
Description |
Int32 |
sourceIndex |
|
Returns
Type Parameters
ReinterpretStore<U>(Int32, U)
Declaration
public void ReinterpretStore<U>(int destIndex, U data)
where U : struct
Parameters
Type |
Name |
Description |
Int32 |
destIndex |
|
U |
data |
|
Type Parameters
ToArray()
Declaration
Returns
Operators
Equality(NativeArray<T>, NativeArray<T>)
Declaration
public static bool operator ==(NativeArray<T> left, NativeArray<T> right)
Parameters
Returns
Inequality(NativeArray<T>, NativeArray<T>)
Declaration
public static bool operator !=(NativeArray<T> left, NativeArray<T> right)
Parameters
Returns
Extension Methods