# NativeText.Enumerator

> An enumerator over the characters (not bytes) of a NativeText.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule
* **Implements:** [IEnumerator\<Rune>](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 NativeText.Enumerator : IEnumerator<Unicode.Rune>, IEnumerator, IDisposable
```

## Remarks

In an enumerator's initial state, its index is invalid. The first [NativeText.Enumerator.MoveNext](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/movenext.md) call advances the enumerator's index to the first character.

## Constructors

| Constructor                                                                                                                                                 | Description                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [Enumerator(Unity.Collections.NativeText)](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/ctor.md#enumerator\(nativetext\))        | Initializes and returns an instance of NativeText.Enumerator. |
| [Enumerator(Unity.Collections.NativeText.ReadOnly)](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/ctor.md#enumerator\(readonly\)) | Initializes and returns an instance of NativeText.Enumerator. |

## Properties

| Property                                                                                      | Description            |
| --------------------------------------------------------------------------------------------- | ---------------------- |
| [Current](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/current.md) | The current character. |

## Methods

| Method                                                                                          | Description                                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/dispose.md)   | Does nothing.                                                                                                                                                                                                     |
| [MoveNext](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/movenext.md) | Advances the enumerator to the next character, returning true if [NativeText.Enumerator.Current](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/current.md) is valid to read afterwards. |
| [Reset](/engine/6000.7/script-reference/unity/collections/nativetext/enumerator/reset.md)       | Resets the enumerator to its initial state.                                                                                                                                                                       |
