Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocalizedObject

A serializable reference to a localized asset of any Object-derived type.
Read time 2 minutesLast updated 7 days ago

Definition

public class LocalizedObject : LocalizedAsset<Object>

Remarks

A LocalizedObject is a LocalizedAsset<TObject> specialized for Object. Use it when the asset type is not known ahead of time; otherwise prefer a more specific type such as LocalizedTexture.
Load a localized asset of an unknown type.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocalizedObjectExample { public async Awaitable Load() { var localizedObject = new LocalizedObject(); localizedObject.SetReference("My Assets", "DATA"); var asset = await localizedObject.GetLocalizedAssetAsync(); if (asset != null) Debug.Log(asset.name); } }}

Inheritance