com.unity.collections 2.1.0-pre.2

com.unity.collections

Notes: processedReleased November 10, 2022

Browse versions

PreviousNext

Unity Compatibility

Minimum Unity: 2022.2 (0a5)

Package Dependencies

Features

  • BinarySearch for `NativeArray.ReadOnly`
  • `NativeArray.CopyFrom` containers: `NativeList`, `NativeHashSet`, `UnsafeHashSet`.
  • `NativeArray.ArrayEquals` containers: `NativeList`.
  • `NativeList.CopyFrom` containers: `NativeArray`, `NativeList`, `UnsafeList`.
  • `NativeList.ArrayEquals` containers: `NativeArray`, `NativeList`, `UnsafeList`.
  • Docs how to create/use/dispose a rewindable allocator.
  • Document how how to define a custom allocator from scratch.
  • `CollectionHelper.DisposeNativeArray` to dispose native array created from a custom allocator.
  • WriteDouble, WritePackedDouble, WritePackedDoubleDelta to DataStreamWriter
  • ReadDouble, ReadPackedDouble, ReadPackedDoubleDelta to DataStreamReader

📈 Improvements

  • Change the default `NativeArrayOptions` in `CollectionHelper.CreateNativeArray` to `UninitializedMemory`.
  • ### Deprecated

API Changes

  • Move doc `allocator.md` into `allocator` folder in `Documentation~`.

🔧 Bug Fixes

  • Don't cache `DataStreamWriter.IsLittleEndian`, as the cache could not be properly populated if its shared static was not 0-initialized.
  • BinarySearch is using read-only access.
  • Memory leak in `Native/UnsafeStream` due to orphaned block.
  • Debug visualizers display content even when safety handle is in write-only mode.