# SetStaticSafetyId(ref AtomicSafetyHandle, int)

> Assigns a provided static safety ID to an AtomicSafetyHandle.

## Definition

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

## SetStaticSafetyId(AtomicSafetyHandle, int)

```csharp
[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
public static void SetStaticSafetyId(ref AtomicSafetyHandle handle, int staticSafetyId)
```

### Parameters

**** (\[AtomicSafetyHandle]\(/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle)): The AtomicSafetyHandle to modify.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The static safety ID to associate with the provided AtomicSafetyHandle. This ID must have been allocated with [AtomicSafetyHandle.NewStaticSafetyId](/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle/newstaticsafetyid.md).

### Remarks

The ID's owner type name and any custom error messages are used by the job debugger when reporting errors involving the target handle.

Additional Resources: [AtomicSafetyHandle.NewStaticSafetyId](/engine/6000.3/script-reference/unity/collections/lowlevel/unsafe/atomicsafetyhandle/newstaticsafetyid.md).
