# PrepareAsync(LocalizationSettings, CancellationToken)

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

## Definition

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

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

### Parameters

**** (\[LocalizationSettings]\(/engine/7000.0/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/7000.0/script-reference/unityengine/awaitable.md) | An [Awaitable](/engine/7000.0/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/7000.0/script-reference/unity/localization/istartuplocaleselector/getstartuplocale.md) can return null. Initialization waits for this method, so nothing inside it can wait for initialization. Awaiting [LocalizationSettings.InitializeAsync](/engine/7000.0/script-reference/unity/localization/localizationsettings/initializeasync.md), or a value in the selected locale, waits for this method to return, so it never finishes. To read a value here, pass the locale to read it in.
