Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocalizedMaterial

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

Definition

public class LocalizedMaterial : LocalizedAsset<Material>

Remarks

A LocalizedMaterial is a LocalizedAsset<TObject> specialized for Material, so it can be serialized and shown in the Inspector.
Load a localized material.

Examples

using Unity.Localization;using UnityEngine;namespace Unity.Localization.Samples{ public class LocalizedMaterialExample { public async Awaitable Load() { var localizedMaterial = new LocalizedMaterial(); localizedMaterial.SetReference("My Assets", "SIGN"); Material material = await localizedMaterial.GetLocalizedAssetAsync(); if (material != null) Debug.Log(material.name); } }}

Inheritance