기술 자료

Unity Engine

Unity Engine

LocalizedFont

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

Definition

public class LocalizedFont : LocalizedAsset<Font>

Remarks

A LocalizedFont is a LocalizedAsset<TObject> specialized for Font, so it can be serialized and shown in the Inspector. Use it to switch typeface with the locale, which a language with a different script needs.
Load a localized font.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocalizedFontExample { public async Awaitable Load() { var localizedFont = new LocalizedFont(); localizedFont.SetReference("My Assets", "UI FONT"); Font font = await localizedFont.GetLocalizedAssetAsync(); if (font != null) Debug.Log(font.name); } }}

Inheritance