# ComputeDetailInstanceTransforms(int, int, int, float, out Bounds)

> This function computes and returns an array of detail object transforms for the specified patch and the specified prototype. You can use this function to retrieve the exact same transform data the Unity engine uses for detail rendering.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.3/script-reference/unityengine.md)
* **Assembly:** UnityEngine.TerrainModule

## ComputeDetailInstanceTransforms(int, int, int, float, Bounds)

```csharp
public DetailInstanceTransform[] ComputeDetailInstanceTransforms(int patchX, int patchY, int layer, float density, out Bounds bounds)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The x index of the patch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The y index of the patch.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The prototype index.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The density setting of the detail.**** (\[Bounds]\(/engine/6000.3/script-reference/unityengine/bounds)): Returns the bounds of the detail objects.

### Returns

| Type                                                                                                  | Description |
| ----------------------------------------------------------------------------------------------------- | ----------- |
| [DetailInstanceTransform\[\]](/engine/6000.3/script-reference/unityengine/detailinstancetransform.md) |             |

### Remarks

Additional Resources: [DetailInstanceTransform](/engine/6000.3/script-reference/unityengine/detailinstancetransform.md).
