# RectInt.PositionEnumerator

> An iterator that allows you to iterate over all positions within the RectInt.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule
* **Implements:** [IEnumerator\<Vector2Int>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1), [IEnumerator](https://learn.microsoft.com/dotnet/api/system.collections.ienumerator), [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

```csharp
public struct RectInt.PositionEnumerator : IEnumerator<Vector2Int>, IEnumerator, IDisposable
```

## Properties

| Property                                                                                     | Description                         |
| -------------------------------------------------------------------------------------------- | ----------------------------------- |
| [Current](/engine/6000.6/script-reference/unityengine/rectint/positionenumerator/current.md) | Current position of the enumerator. |

## Methods

| Method                                                                                                   | Description                                                                                                                                             |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetEnumerator](/engine/6000.6/script-reference/unityengine/rectint/positionenumerator/getenumerator.md) | Returns this as an iterator that allows you to iterate over all positions within the [RectInt](/engine/6000.6/script-reference/unityengine/rectint.md). |
| [MoveNext](/engine/6000.6/script-reference/unityengine/rectint/positionenumerator/movenext.md)           | Moves the enumerator to the next position.                                                                                                              |
| [Reset](/engine/6000.6/script-reference/unityengine/rectint/positionenumerator/reset.md)                 | Resets this enumerator to its starting state.                                                                                                           |
