Class LocalizedAssetEvent<TObject, TReference, TEvent>
A version of Localized
Inheritance
Inherited Members
Namespace: UnityEngine .Localization.Components
Assembly: Unity.Localization.dll
Syntax
public class LocalizedAssetEvent<TObject, TReference, TEvent> : LocalizedAssetBehaviour<TObject, TReference> where TObject : Object where TReference : LocalizedAsset<TObject>, new() where TEvent : UnityEvent<TObject>, new()
Type Parameters
Name | Description |
---|---|
TObject | The type of Asset to be Localized. Must inherit from UnityEngine.Object |
TReference | The Serializable LocalizedAsset class. This will be used for the Asset |
TEvent | The Serializable UnityEvent that should be called when the asset is loaded. |
Examples
This example shows how a Font asset could be localized.
using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Localization;
using UnityEngine.Localization.Components;
[Serializable]
public class LocalizedFont : LocalizedAsset<Font> {}
[Serializable]
public class FontEvent : UnityEvent<Font> {}
public class LocalizedFontEventComponent : LocalizedAssetEvent<Font, LocalizedFont, FontEvent> {}
Properties
Name | Description |
---|---|
On |
Unity Event that is invoked when the localized asset is updated. |
Methods
Name | Description |
---|---|
Update |
Called when Asset |