# NativeSliceUnsafeUtility

> Contains unsafe methods for working with NativeSlice instances.

## Definition

* **Type:** Class
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static class NativeSliceUnsafeUtility
```

## Static Methods

| Method                                                                                                                                                             | Description                                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [ConvertExistingDataToNativeSlice](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/nativesliceunsafeutility/convertexistingdatatonativeslice.md) | Creates a new NativeSlice from existing data.                                                                                             |
| [GetAtomicSafetyHandle](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/nativesliceunsafeutility/getatomicsafetyhandle.md)                       | Gets the [AtomicSafetyHandle](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle.md) for a NativeSlice. |
| [GetUnsafePtr](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/nativesliceunsafeutility/getunsafeptr.md)                                         | Gets a NativeSlice memory buffer pointer and checks whether the native array can be written to.                                           |
| [GetUnsafeReadOnlyPtr](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/nativesliceunsafeutility/getunsafereadonlyptr.md)                         | Gets a NativeSlice memory buffer pointer and checks whether the native array can be read from.                                            |
| [SetAtomicSafetyHandle](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/nativesliceunsafeutility/setatomicsafetyhandle.md)                       | Set the [AtomicSafetyHandle](/engine/6000.0/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle.md) on NativeSlice.     |
