# this[]

> Gets the IComponentData instance of type T for the specified entity.

## Definition

* **Type:** Property
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## this\[Entity]

Gets the [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) instance of type T for the specified entity.

```csharp
public T this[Entity entity] { get; set; }
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.

### Returns

| Type | Description                                                                                 |
| ---- | ------------------------------------------------------------------------------------------- |
| T    | An [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) type. |

### Remarks

Normally, you cannot write to components accessed using a ComponentLookup instance in a parallel Job. This restriction is in place because multiple threads could write to the same component, leading to a race condition and nondeterministic results. However, when you are certain that your algorithm cannot write to the same component from different threads, you can manually disable this safety check by putting the \[NativeDisableParallelForRestriction] attribute on the ComponentLookup field in the Job.

[NativeDisableParallelForRestrictionAttribute]: https://docs.unity3d.com/ScriptReference/Unity.Collections.NativeDisableParallelForRestrictionAttribute.html

## this\[SystemHandle]

Gets the [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) instance of type T for the specified system's associated entity.

```csharp
public T this[SystemHandle system] { get; set; }
```

### Parameters

**** (\[SystemHandle]\(/engine/7000.0/script-reference/unity/entities/systemhandle)): The system handle.

### Returns

| Type | Description                                                                                 |
| ---- | ------------------------------------------------------------------------------------------- |
| T    | An [IComponentData](/engine/7000.0/script-reference/unity/entities/icomponentdata.md) type. |

### Remarks

Normally, you cannot write to components accessed using a ComponentDataFromEntity instance in a parallel Job. This restriction is in place because multiple threads could write to the same component, leading to a race condition and nondeterministic results. However, when you are certain that your algorithm cannot write to the same component from different threads, you can manually disable this safety check by putting the \[NativeDisableParallelForRestriction] attribute on the ComponentDataFromEntity field in the Job.

[NativeDisableParallelForRestrictionAttribute]: https://docs.unity3d.com/ScriptReference/Unity.Collections.NativeDisableParallelForRestrictionAttribute.html
