Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocalizedTexture

A serializable reference to a localized texture asset.
Read time 2 minutesLast updated 7 days ago

Definition

public class LocalizedTexture : LocalizedAsset<Texture>

Remarks

A LocalizedTexture is a LocalizedAsset<TObject> specialized for Texture, so it can be serialized and shown in the Inspector.
Load a localized texture.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocalizedTextureExample { public async Awaitable Load() { var localizedTexture = new LocalizedTexture(); localizedTexture.SetReference("My Assets", "ICON"); Texture texture = await localizedTexture.GetLocalizedAssetAsync(); if (texture != null) Debug.Log(texture.name); } }}

Constructors

Constructor

Description

LocalizedTexture()Creates a localized texture reference.

Inheritance