# GetTransformRef(Entity, bool)

> Gets the TransformRef of an entity.

## Definition

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

```csharp
public TransformRef GetTransformRef(Entity entity, bool isReadOnly)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): True for read-only access, or false for read/write access.

### Returns

| Type                                                                           | Description                     |
| ------------------------------------------------------------------------------ | ------------------------------- |
| [TransformRef](/engine/7000.0/script-reference/unity/entities/transformref.md) | The TransformRef to the entity. |

### Remarks

Using this method registers a read-only or read/write dependency for the system on TransformRef, based on the value passed to `isReadOnly`.
