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

            Dispose();
            return(list);
        }
Esempio n. 2
0
 public void AddRange <T>(UnsafeListData list) where T : unmanaged
 {
     AddRange(UnsafeCollectionUtility.SizeOf <T>(), list.Ptr, list.Length);
 }
Esempio n. 3
0
 public AiNativeList(int initialCapacity)
 {
     m_ListData = UnsafeListData.Create(UnsafeCollectionUtility.SizeOf <T>(), initialCapacity);
 }
Esempio n. 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));
        }