# Platform Notes

> StringZilla for C#

### Zero-Copy in Unity

StringZilla's native byte kernels are a strong fit for Unity's `NativeArray<byte>` (loaded text assets, network buffers), searched and hashed without marshalling.

```csharp
using StringZilla;
using Unity.Collections;

NativeArray<byte> asset = LoadUtf8Asset();
ReadOnlySpan<byte> text = asset.AsReadOnlySpan(); // no copy
long position = Sz.IndexOf(text, "player_id"u8);
ulong identifier = Sz.Hash(text);
```

The managed package targets `net8.0`, which loads on Unity 6.2+ with the CoreCLR/.NET runtime.
On older Unity (Mono/IL2CPP), drop the platform native library into `Assets/Plugins/<platform>/` and call the same API.
The native binary itself is Unity-compatible; only the managed wrapper's target framework is the gate.

