기술 자료

Unity Engine

Unity Engine

LocalizedGameObject

A serializable reference to a localized GameObject asset.
읽는 시간 2분최근 업데이트: 한 달 전

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