com.unity.collections 2.1.0-pre.2
Notes: processedReleased November 10, 2022
Unity Compatibility
Minimum Unity: 2022.2 (0a5)
Package Dependencies
- com.unity.burst (1.7.4)
- com.unity.modules.unityanalytics (1.0.0)
- com.unity.nuget.mono-cecil (1.11.4)
- com.unity.test-framework (1.1.33)
✨ 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.
