# PrepareAsync(LocalizationSettings, CancellationToken)

> Loads whatever the selector needs before it is asked for a locale.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

```csharp
Awaitable PrepareAsync(LocalizationSettings settings, CancellationToken cancellationToken = default)
```

### Parameters

**** (\[LocalizationSettings]\(/engine/6000.7/script-reference/unity/localization/localizationsettings)): The localization settings that are initializing.**** (\[CancellationToken]\(https\://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken)): The token that signals the preparation should be canceled.

### Returns

| Type                                                                  | Description                                                                                                                   |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| [Awaitable](/engine/6000.7/script-reference/unityengine/awaitable.md) | An [Awaitable](/engine/6000.7/script-reference/unityengine/awaitable.md) that completes once the selector is ready to choose. |

### Remarks

Runs once per initialization. An exception thrown here is logged and the run continues, so the selector should leave itself in a state where [IStartupLocaleSelector.GetStartupLocale](/engine/6000.7/script-reference/unity/localization/istartuplocaleselector/getstartuplocale.md) can return null.
