# CellToWorld(Vector3Int)

> Converts a cell position to world position space.

## Definition

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

```csharp
public Vector3 CellToWorld(Vector3Int cellPosition)
```

### Parameters

**** (\[Vector3Int]\(/engine/6000.7/script-reference/unityengine/vector3int)): Cell position to convert.

### Returns

| Type                                                              | Description                          |
| ----------------------------------------------------------------- | ------------------------------------ |
| [Vector3](/engine/6000.7/script-reference/unityengine/vector3.md) | World position of the cell position. |

### Examples

```csharp
 // Snap the GameObject to parent GridLayout
using UnityEngine;

public class ExampleClass : MonoBehaviour
{
    void Start()
    {
        GridLayout gridLayout = transform.parent.GetComponentInParent<GridLayout>();
        Vector3Int cellPosition = gridLayout.WorldToCell(transform.position);
        transform.position = gridLayout.CellToWorld(cellPosition);
    }
}
```
