C# 클래스 Unity.Collections.NativeList

파일 보기 프로젝트 열기: needle-mirror/com.unity.collections 1 사용 예제들

공개 메소드들

메소드 설명
Add ( ) : void

Adds an element to the list.

If the list has reached its current capacity, it copies the original, internal array to a new, larger array, and then deallocates the original.

AddNoResize ( value ) : void

Adds an element to the list.

If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.

AddRangeNoResize ( NativeList list ) : void

Adds elements from a list to this list.

If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.

AddRangeNoResize ( void* ptr, int length ) : void

Adds elements from a buffer to this list.

If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.

GetUnsafeList ( ) : UnsafeList*

Return internal UnsafeList*

NativeList ( Allocator allocator ) : System

Constructs a new list using the specified type of memory allocation.

The list initially has a capacity of one. To avoid reallocating memory for the list, specify sufficient capacity up front.

NativeList ( int initialCapacity, Allocator allocator ) : System

Constructs a new list with the specified initial capacity and type of memory allocation.

this ( int index ) : T

Retrieve a member of the contaner by index.

비공개 메소드들

메소드 설명
CreateStaticSafetyId ( ) : void
ElementAt ( int index ) : T

Initialize ( int initialCapacity, &allocator, int disposeSentinelStackDepth ) : void
NativeList ( int initialCapacity, Allocator allocator, int disposeSentinelStackDepth ) : System
New ( int initialCapacity, &allocator ) : NativeList
New ( int initialCapacity, &allocator, int disposeSentinelStackDepth ) : NativeList

메소드 상세

Add() 공개 메소드

Adds an element to the list.
If the list has reached its current capacity, it copies the original, internal array to a new, larger array, and then deallocates the original.
public Add ( ) : void
리턴 void

AddNoResize() 공개 메소드

Adds an element to the list.
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
public AddNoResize ( value ) : void
value The value to be added at the end of the list.
리턴 void

AddRangeNoResize() 공개 메소드

Adds elements from a list to this list.
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
public AddRangeNoResize ( NativeList list ) : void
list NativeList Other container to copy elements from.
리턴 void

AddRangeNoResize() 공개 메소드

Adds elements from a buffer to this list.
If the list has reached its current capacity, internal array won't be resized, and exception will be thrown.
Thrown if length is negative.
public AddRangeNoResize ( void* ptr, int length ) : void
ptr void* A pointer to the buffer.
length int The number of elements to add to the list.
리턴 void

GetUnsafeList() 공개 메소드

Return internal UnsafeList*
public GetUnsafeList ( ) : UnsafeList*
리턴 UnsafeList*

NativeList() 공개 메소드

Constructs a new list using the specified type of memory allocation.
The list initially has a capacity of one. To avoid reallocating memory for the list, specify sufficient capacity up front.
public NativeList ( Allocator allocator ) : System
allocator Allocator A member of the /// [Unity.Collections.Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html) enumeration.
리턴 System

NativeList() 공개 메소드

Constructs a new list with the specified initial capacity and type of memory allocation.
public NativeList ( int initialCapacity, Allocator allocator ) : System
initialCapacity int The initial capacity of the list. If the list grows larger than its capacity, /// the internal array is copied to a new, larger array.
allocator Allocator A member of the /// [Unity.Collections.Allocator](https://docs.unity3d.com/ScriptReference/Unity.Collections.Allocator.html) enumeration.
리턴 System

this() 공개 메소드

Retrieve a member of the contaner by index.
Thrown if index is negative or >= to .
public this ( int index ) : T
index int The zero-based index into the list.
리턴 T