public AiNativeArray(int length) { if (length <= 0) { throw new ArgumentException("Length must be > 0"); } m_Data = UnsafeArrayData.Create(UnsafeCollectionUtility.SizeOf <T>(), length); }
public void Dispose() { UnsafeArrayData.Destroy(m_Data); m_Data = null; }