decline-cookies / anvil-unity-dots

Unity DOTS and ECS specific additions and extensions to Anvil
MIT License
4 stars 1 forks source link

`UnsafeArrayUtility` - Add `AsUnsafeArray` overloads #292

Closed mbaker3 closed 9 months ago

mbaker3 commented 9 months ago

Add two more overloads for UnsafeArrayUtility.AsUnsafeArray that represent DynamicBuffer<T> and UnsafeList<T> as UnsafeArray<T> instances

What is the current behaviour?

Users don't have a convenient way to represent a DynamicBuffer<T> or UnsafeList<T> as an UnsafeArray<T>.

What is the new behaviour?

Users can now call AsUnsafeArray on both DynamicBuffer<T> and UnsafeList<T> instances.

What issues does this resolve?

What PRs does this depend on?

Does this introduce a breaking change?