# PreferredLoading

> The default loading behaviour used by the reference accessors and their change events.

## Definition

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

```csharp
public static LoadingPreference PreferredLoading { get; set; }
```

### Remarks

Defaults to [LoadingPreference.Asynchronous](/engine/6000.7/script-reference/unity/localization/loadingpreference/asynchronous.md). When set to [LoadingPreference.Synchronous](/engine/6000.7/script-reference/unity/localization/loadingpreference/synchronous.md), the event-driven accessors ([LocalizedString.GetLocalizedStringAsync](/engine/6000.7/script-reference/unity/localization/localizedstring/getlocalizedstringasync.md), [LocalizedAsset\<TObject>.GetLocalizedAssetAsync()](/engine/6000.7/script-reference/unity/localization/localizedasset1/getlocalizedassetasync.md), and [LocalizedTable.GetTableAsync](/engine/6000.7/script-reference/unity/localization/localizedtable/gettableasync.md)) resolve synchronously when the value is available, and fall back to an asynchronous load when it is not. When no settings instance is registered, this reads as [LoadingPreference.Asynchronous](/engine/6000.7/script-reference/unity/localization/loadingpreference/asynchronous.md).

Additional Resources: [LoadingPreference](/engine/6000.7/script-reference/unity/localization/loadingpreference.md)

Make localized references resolve synchronously by default.

### Examples

```csharp
using Unity.Localization;
using UnityEngine;

namespace Unity.Localization.Samples
{
    public class PreferredLoadingExample : MonoBehaviour
    {
        [SerializeField] LocalizedString m_Greeting = new();

        void OnEnable()
        {
            LocalizationSettings.PreferredLoading = LoadingPreference.Synchronous;
            m_Greeting.StringChanged += OnGreetingChanged;
        }

        void OnDisable() => m_Greeting.StringChanged -= OnGreetingChanged;

        void OnGreetingChanged(string value) => Debug.Log(value);
    }
}
```
