# NativeSliceUnsafeUtility

> Contains unsafe methods for working with NativeSlice<T> instances.

## Definition

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

```csharp
public static class NativeSliceUnsafeUtility
```

## Static Methods

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