Class AssetMapComponentLocalizer<LT, CT, AT, LAD>
Base class for component localizers that have a map from language to an asset value.
Inherited Members
Namespace: NoSuchStudio.Localization
Assembly: NoSuchStudio-Localization.dll
Syntax
public abstract class AssetMapComponentLocalizer<LT, CT, AT, LAD> : ComponentLocalizer<LT, CT>, ILocalizationServiceComponent, IServiceComponent<LocalizationService> where LT : AssetMapComponentLocalizer<LT, CT, AT, LAD> where CT : Component where LAD : LocalizedAssetData<AT>
Type Parameters
| Name | Description |
|---|---|
| LT | Type of the localizer component that localizes CT. |
| CT | Type of the component that is being localized. For example if localizing the UnityEngine.Sprite of an UnityEngine.UI.Image component, CT = UnityEngine.UI.Image |
| AT | Type of the field on CT that is being localized. For example if localizing the UnityEngine.Sprite of an UnityEngine.UI.Image, AT = UnityEngine.Sprite. |
| LAD | This type parameter can be removed in Unity 2020.1 since Unity will start Serializing generic types. |
Remarks
The last generic type parameter (LAD) can be removed in 2020.1 since Unity will start serializing generic classes.
Fields
_assetList
Declaration
[SerializeField]
protected List<LAD> _assetList
Field Value
| Type | Description |
|---|---|
| List<LAD> |
_assets
Declaration
[NonSerialized]
protected Dictionary<string, AT> _assets
Field Value
| Type | Description |
|---|---|
| Dictionary<String, AT> |
_defaultAsset
Declaration
[SerializeField]
protected AT _defaultAsset
Field Value
| Type | Description |
|---|---|
| AT |
Methods
Init()
Declaration
protected override void Init()
Overrides
NoSuchStudio.Localization.ComponentLocalizer<LT, CT>.Init()
Implements
IServiceComponent<>