Show / Hide Table of Contents

Struct NativeArray<T>

Implements
IDisposable
IEnumerable<T>
IEnumerable
IEquatable<NativeArray<T>>
Inherited Members
ValueType.ToString()
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Namespace: Unity.Collections
Assembly: UnityEngine.dll
Syntax
public struct NativeArray<T> : IDisposable, IEnumerable<T>, IEnumerable, IEquatable<NativeArray<T>> where T : struct
Type Parameters
Name Description
T

Constructors

| Improve this Doc View Source

NativeArray(T[], Allocator)

Declaration
public NativeArray(T[] array, Allocator allocator)
Parameters
Type Name Description
T[] array
Allocator allocator
| Improve this Doc View Source

NativeArray(Int32, Allocator, NativeArrayOptions)

Declaration
public NativeArray(int length, Allocator allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
Parameters
Type Name Description
Int32 length
Allocator allocator
NativeArrayOptions options
| Improve this Doc View Source

NativeArray(NativeArray<T>, Allocator)

Declaration
public NativeArray(NativeArray<T> array, Allocator allocator)
Parameters
Type Name Description
NativeArray<T> array
Allocator allocator

Properties

| Improve this Doc View Source

IsCreated

Declaration
public bool IsCreated { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Item[Int32]

Declaration
public T this[int index] { get; set; }
Parameters
Type Name Description
Int32 index
Property Value
Type Description
T
| Improve this Doc View Source

Length

Declaration
public int Length { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

Copy(T[], Int32, NativeArray<T>, Int32, Int32)

Declaration
public static void Copy(T[] src, int srcIndex, NativeArray<T> dst, int dstIndex, int length)
Parameters
Type Name Description
T[] src
Int32 srcIndex
NativeArray<T> dst
Int32 dstIndex
Int32 length
| Improve this Doc View Source

Copy(T[], NativeArray<T>)

Declaration
public static void Copy(T[] src, NativeArray<T> dst)
Parameters
Type Name Description
T[] src
NativeArray<T> dst
| Improve this Doc View Source

Copy(T[], NativeArray<T>, Int32)

Declaration
public static void Copy(T[] src, NativeArray<T> dst, int length)
Parameters
Type Name Description
T[] src
NativeArray<T> dst
Int32 length
| Improve this Doc View Source

Copy(NativeArray<T>, T[])

Declaration
public static void Copy(NativeArray<T> src, T[] dst)
Parameters
Type Name Description
NativeArray<T> src
T[] dst
| Improve this Doc View Source

Copy(NativeArray<T>, T[], Int32)

Declaration
public static void Copy(NativeArray<T> src, T[] dst, int length)
Parameters
Type Name Description
NativeArray<T> src
T[] dst
Int32 length
| Improve this Doc View Source

Copy(NativeArray<T>, Int32, T[], Int32, Int32)

Declaration
public static void Copy(NativeArray<T> src, int srcIndex, T[] dst, int dstIndex, int length)
Parameters
Type Name Description
NativeArray<T> src
Int32 srcIndex
T[] dst
Int32 dstIndex
Int32 length
| Improve this Doc View Source

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
Type Name Description
NativeArray<T> src
Int32 srcIndex
NativeArray<T> dst
Int32 dstIndex
Int32 length
| Improve this Doc View Source

Copy(NativeArray<T>, NativeArray<T>)

Declaration
public static void Copy(NativeArray<T> src, NativeArray<T> dst)
Parameters
Type Name Description
NativeArray<T> src
NativeArray<T> dst
| Improve this Doc View Source

Copy(NativeArray<T>, NativeArray<T>, Int32)

Declaration
public static void Copy(NativeArray<T> src, NativeArray<T> dst, int length)
Parameters
Type Name Description
NativeArray<T> src
NativeArray<T> dst
Int32 length
| Improve this Doc View Source

CopyFrom(T[])

Declaration
public void CopyFrom(T[] array)
Parameters
Type Name Description
T[] array
| Improve this Doc View Source

CopyFrom(NativeArray<T>)

Declaration
public void CopyFrom(NativeArray<T> array)
Parameters
Type Name Description
NativeArray<T> array
| Improve this Doc View Source

CopyTo(T[])

Declaration
public void CopyTo(T[] array)
Parameters
Type Name Description
T[] array
| Improve this Doc View Source

CopyTo(NativeArray<T>)

Declaration
public void CopyTo(NativeArray<T> array)
Parameters
Type Name Description
NativeArray<T> array
| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
ValueType.Equals(Object)
| Improve this Doc View Source

Equals(NativeArray<T>)

Declaration
public bool Equals(NativeArray<T> other)
Parameters
Type Name Description
NativeArray<T> other
Returns
Type Description
Boolean
| Improve this Doc View Source

GetEnumerator()

Declaration
public NativeArray<T>.Enumerator GetEnumerator()
Returns
Type Description
NativeArray.Enumerator<>
| Improve this Doc View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
ValueType.GetHashCode()
| Improve this Doc View Source

ToArray()

Declaration
public T[] ToArray()
Returns
Type Description
T[]

Operators

| Improve this Doc View Source

Equality(NativeArray<T>, NativeArray<T>)

Declaration
public static bool operator ==(NativeArray<T> left, NativeArray<T> right)
Parameters
Type Name Description
NativeArray<T> left
NativeArray<T> right
Returns
Type Description
Boolean
| Improve this Doc View Source

Inequality(NativeArray<T>, NativeArray<T>)

Declaration
public static bool operator !=(NativeArray<T> left, NativeArray<T> right)
Parameters
Type Name Description
NativeArray<T> left
NativeArray<T> right
Returns
Type Description
Boolean

Explicit Interface Implementations

| Improve this Doc View Source

IEnumerable<T>.GetEnumerator()

Declaration
IEnumerator<T> IEnumerable<T>.GetEnumerator()
Returns
Type Description
IEnumerator<T>
| Improve this Doc View Source

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type Description
IEnumerator

Implements

System.IDisposable
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IEquatable<T>

Extension Methods

NativeSliceExtensions.Slice<T>(NativeArray<T>)
NativeSliceExtensions.Slice<T>(NativeArray<T>, Int32)
NativeSliceExtensions.Slice<T>(NativeArray<T>, Int32, Int32)
MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
NativeArrayUnsafeUtility.GetUnsafePtr<T>(NativeArray<T>)
NativeArrayUnsafeUtility.GetUnsafeReadOnlyPtr<T>(NativeArray<T>)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX