Exemple #1
0
        public AiNativeList <T> ToNativeList()
        {
            var data = UnsafeListData.CreateFrom(this);
            AiNativeList <T> list = new AiNativeList <T>(data);

            Dispose();
            return(list);
        }
Exemple #2
0
 public void AddRange <T>(UnsafeListData list) where T : unmanaged
 {
     AddRange(UnsafeCollectionUtility.SizeOf <T>(), list.Ptr, list.Length);
 }
Exemple #3
0
 public AiNativeList(int initialCapacity)
 {
     m_ListData = UnsafeListData.Create(UnsafeCollectionUtility.SizeOf <T>(), initialCapacity);
 }
Exemple #4
0
 public void Dispose()
 {
     UnsafeListData.Destroy(m_ListData);
 }
        public static AiNativeList <T> ToNativeList <T>(this byte[] source) where T : unmanaged
        {
            var data = UnsafeListData.CreateFrom <T>(source);

            return(new AiNativeList <T>(data));
        }