# SetAtomicSafetyHandle<T>(ref NativeArray<T>, AtomicSafetyHandle)

> Sets a new AtomicSafetyHandle on a NativeArray.

## Definition

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

## SetAtomicSafetyHandle\<T>(NativeArray\<T>, AtomicSafetyHandle)

```csharp
public static void SetAtomicSafetyHandle<T>(ref NativeArray<T> array, AtomicSafetyHandle safety) where T : struct
```

### Parameters

**** (\[NativeArray\<T>]\(/engine/6000.3/script-reference/unity/collections/nativearray1)): The NativeArray to set a new handle on.**** (\[AtomicSafetyHandle]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The new AtomicSafetyHandle to set.
