# ExclusiveEntityTransaction

> Provides an interface to safely perform a subset of ExclusiveEntityTransaction.EntityManager operations from a single worker thread, by temporarily giving that thread exclusive access to a World 's ExclusiveEntityTransaction.EntityManager.

## Definition

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

```csharp
public struct ExclusiveEntityTransaction
```

## Remarks

The intended use case for this interface is to let a worker thread stream Entity data into a staging [World](/engine/7000.0/script-reference/unity/entities/world.md) and perform any necessary post-processing structural changes, prior to moving the final data into the main simulation world using [EntityManager.MoveEntitiesFrom](/engine/7000.0/script-reference/unity/entities/entitymanager/moveentitiesfrom.md). This lets the main thread continue to safely process the primary world while the new data is loading in, and not require a main-thread sync point until the new Entities are fully loaded and ready to be injected.

**Warning:** Only the [ExclusiveEntityTransaction.EntityManager](/engine/7000.0/script-reference/unity/entities/exclusiveentitytransaction/entitymanager.md) operations exposed by this struct are supported within the context of an exclusive entity transaction. For more information, refer to Safety in Entities.

Additional Resources: [EntityManager.BeginExclusiveEntityTransaction](/engine/7000.0/script-reference/unity/entities/entitymanager/beginexclusiveentitytransaction.md), [EntityManager.EndExclusiveEntityTransaction](/engine/7000.0/script-reference/unity/entities/entitymanager/endexclusiveentitytransaction.md)

## Properties

| Property                                                                                                    | Description                                               |
| ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| [EntityManager](/engine/7000.0/script-reference/unity/entities/exclusiveentitytransaction/entitymanager.md) | Return the entity manager this transaction operates upon. |

## Methods

| Method                                                                                                            | Description                                 |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [SetComponentData](/engine/7000.0/script-reference/unity/entities/exclusiveentitytransaction/setcomponentdata.md) | Sets the value of a component of an entity. |
