コード例 #1
0
 public static int IndexOf <T, U>(this NativeBufferArray <T> array, U value) where T : struct, System.IEquatable <U>
 {
     if (array.isCreated == false)
     {
         return(-1);
     }
     return(array.arr.IndexOf(value));
 }
コード例 #2
0
 public Enumerator(NativeBufferArray <T> bufferArray)
 {
     this.bufferArray = bufferArray;
     this.index       = -1;
 }
コード例 #3
0
 public bool Equals(NativeBufferArray <T> other)
 {
     return(this == other);
 }
コード例 #4
0
 public static NativeBufferArray <T> From(NativeBufferArray <T> arr)
 {
     return(new NativeBufferArray <T>(arr));
 }
コード例 #5
0
 internal NativeBufferArray(NativeBufferArray <T> arr)
 {
     this.Length = arr.Length;
     this.arr    = new NativeArray <T>(arr.arr, Allocator.Persistent);
 }
コード例 #6
0
 public static int IndexOf <T, U>(this NativeBufferArray <T> array, U value) where T : struct, System.IEquatable <U>
 {
     return(array.arr.IndexOf(value));
 }