Skip to content

Commit a9f12a0

Browse files
committed
Add a README.md
Other things
1 parent 1cb63b3 commit a9f12a0

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
registry=https://upm-pkgs.voltstro.dev
2+
always-auth=true

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Native Array Span Extensions
2+
3+
Provides extensions to Unity's `NativeArray<T>` that make using .NET's Span<T> with them easier
4+
5+
## Features
6+
7+
- Provides theses extensions to `NativeArray<T>`:
8+
- `CopyTo` for copying to a `Span<T>`
9+
- `CopyFrom` for copying from a `ReadOnlySpan<T>`
10+
- Same extensions are also available for `NativeSlice<T>`
11+
- Provides theses extensions to `Span<T>` and `ReadOnlySpan<T>`:
12+
- `CopyTo` for copying a Span to a `NativeArray<T>`
13+
- `ToNativeArray` for creating a new `NativeArray<T>` and copying the span's buffer to it
14+
15+
## Getting Started
16+
17+
### Package Installation
18+
19+
#### Prerequisites
20+
21+
```
22+
Unity 2021.3.x
23+
```
24+
25+
(Newer Unity versions should be fine as well)
26+
27+
### Installation Methods
28+
29+
There are three main sources on how you can install this package. Pick which ever one suites you the best!
30+
31+
#### Voltstro UPM Registry
32+
33+
You can install this package from our custom UPM registry. To setup our registry, see [here](https://github.com/Voltstro/VoltstroUPM#setup).
34+
35+
Once you have the registry added to your project, you can install it like any other package via the package manager.
36+
37+
#### OpenUPM
38+
39+
You can install this package via [OpenUPM](https://openupm.com/).
40+
41+
To install it, use their CLI:
42+
43+
```bash
44+
openupm-cli add dev.voltstro.nativearrayspanextensions
45+
```
46+
47+
#### Git
48+
49+
To install it via the package manager with git you will need to:
50+
51+
1. Open up the package manager via Windows **->** Package Manager
52+
2. Click on the little + sign **->** Add package from git URL...
53+
3. Type `https://github.com/Voltstro-Studios/NativeArraySpanExtensions.git` and add it
54+
4. Unity will now download and install the package

README.md.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "dev.voltstro.unitynativearrayspanextensions",
3-
"displayName": "Unity Native Array Span Extensions",
2+
"name": "dev.voltstro.nativearrayspanextensions",
3+
"displayName": "Native Array Span Extensions",
44
"version": "1.0.0",
5-
"description": "Proves Span/Memory extensions to Unity's NativeArray",
5+
"description": "Provides extensions to Unity's NativeArray that make using .NET's Span<T> with them easier",
66
"unity": "2021.3",
77
"keywords": [
88
"native",

0 commit comments

Comments
 (0)