Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocalizedGameObject

A serializable reference to a localized GameObject asset.
Read time 2 minutesLast updated 6 days ago

Definition

public class LocalizedGameObject : LocalizedAsset<GameObject>

Remarks

A LocalizedGameObject is a LocalizedAsset<TObject> specialized for GameObject, so it can be serialized and shown in the Inspector.
Load a localized prefab.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocalizedGameObjectExample { public async Awaitable Load() { var localizedGameObject = new LocalizedGameObject(); localizedGameObject.SetReference("My Assets", "PREFAB"); GameObject prefab = await localizedGameObject.GetLocalizedAssetAsync(); if (prefab != null) Debug.Log(prefab.name); } }}

Inheritance