Native Array Span Extensions
Provides extensions to Unity's NativeArray that make using .NET's Span<T> with them easier.
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/track/nativearrayspanextensions.git README
Native Array Span Extensions
Provides extensions to Unity's NativeArray<T> that make using .NET's Span
Features
- Provides theses extensions to
NativeArray<T>:CopyTofor copying to aSpan<T>CopyFromfor copying from aReadOnlySpan<T>- Same extensions are also available for
NativeSlice<T>
- Provides theses extensions to
Span<T>andReadOnlySpan<T>:CopyTofor copying a span to aNativeArray<T>ToNativeArrayfor creating a newNativeArray<T>and copying the span's buffer to it
Getting Started
Package Installation
Prerequisites
Unity 2020.3.x
(Unity 2021.3.x is the recommended version however)
(Newer Unity versions should be fine as well)
Unity 2020.3.x Prerequisites
IF YOU ARE USING UNITY 2020.3.x WITH THIS PACKAGE, READ THIS. (Newer versions do not need this step!)
System.Memory dll is required (this is where Span<T> use to come from). This package it self has no direct dependent installation method for System.Memory. You can either install it directly into your Unity project from NuGet (by extracting it from the .nupkg file), or via an automatic seamless UPM integration, such as Voltstro UPM, OpenUPM, or UnityNuGet.
Installation Methods
There are three main sources on how you can install this package. Pick which ever one suites you the best!
Voltstro UPM Registry
You can install this package from our custom UPM registry. To setup our registry, see here.
Once you have the registry added to your project, you can install it like any other package via the package manager.
OpenUPM
You can install this package via OpenUPM.
To install it, use their CLI:
openupm add dev.voltstro.nativearrayspanextensions
Git
To install it via the package manager with git you will need to:
- Open up the package manager via Windows -> Package Manager
- Click on the little + sign -> Add package from git URL...
- Type
https://github.com/Voltstro-Studios/NativeArraySpanExtensions.gitand add it - Unity will now download and install the package
Authors
Voltstro - Initial Work - Voltstro
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Installs Over Time
Operating Systems
No data yet
Top Countries
No data yet
Git Versions
No data yet
Embed Install Badge
Add an install count badge to your README
[](https://www.pkglnk.dev/pkg/nativearrayspanextensions)<a href="https://www.pkglnk.dev/pkg/nativearrayspanextensions"><img src="https://www.pkglnk.dev/badge/nativearrayspanextensions.svg?style=pkglnk" alt="pkglnk installs"></a>
No comments yet. Be the first!