---
title: ThreadIndex
product: Unity Editor
version: '6000.7'
latest_version: '7000.0'
status: This page documents version 6000.7. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmap2/parallelwriter/threadindex
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/collections/lowlevel/unsafe/unsafeparallelhashmap2/parallelwriter/threadindex.md
last_updated: 2026-09-14
generated_at: 2026-11-09T06:30:54.000Z
locale: en-us
---

# ThreadIndex

> Returns the index of the current thread.

## Definition

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

```csharp
public int ThreadIndex { get; }
```

### Remarks

In a job, each thread gets its own copy of the ParallelWriter struct, and the job system assigns each copy the index of its thread.
