We’ve seen how NativeArray works, but what if we want more kinds of native collections? Unity 2018.1 only has that one, but you can make your own! Today’s article shows exactly how to do that.
Posts Tagged nativearray
NativeArray<T> is a new type introduced recently in Unity 2018.1. It’s like
List<T> except it’s backed by an unmanaged array instead of a managed array. It’s also a struct instead of a class. This means it creates no garbage for the GC to later collect. That’s the surface level description, but today we’ll go in depth to find out how it really works and learn some interesting facts along the way.