# GetAllocTileSize

> Returns the tile size based on the given pixel size.

## Definition

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

## GetAllocTileSize(Vector2Int)

Returns the tile size based on the given pixel size.

```csharp
public static Vector2Int GetAllocTileSize(Vector2Int pixelSize)
```

### Parameters

**** (\[Vector2Int]\(/engine/6000.3/script-reference/unityengine/vector2int)): Pixel size.

### Returns

| Type                                                                    | Description                              |
| ----------------------------------------------------------------------- | ---------------------------------------- |
| [Vector2Int](/engine/6000.3/script-reference/unityengine/vector2int.md) | Tile size matching the given pixel size. |

## GetAllocTileSize(int, int)

Returns the tile size based on the given pixel size.

```csharp
public static Vector2Int GetAllocTileSize(int pixelWidth, int pixelHeight)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Width in pixels.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Height in pixels.

### Returns

| Type                                                                    | Description                              |
| ----------------------------------------------------------------------- | ---------------------------------------- |
| [Vector2Int](/engine/6000.3/script-reference/unityengine/vector2int.md) | Tile size matching the given pixel size. |
