Class ComponentLocalizer<LT, CT>
Base class for components that localize other components.
Inheritance
ComponentLocalizer<LT, CT>
Assembly: NoSuchStudio-Localization.dll
Syntax
[ExecuteInEditMode]
public abstract class ComponentLocalizer<LT, CT> : NoSuchMonoBehaviour, ILocalizationServiceComponent, IServiceComponent<LocalizationService> where LT : ComponentLocalizer<LT, CT> where CT : Component
Type Parameters
| Name |
Description |
| LT |
Type of the component that localizes CT.
|
| CT |
Type of the component that is being localized.
|
Fields
_component
Declaration
[NonSerialized]
protected CT _component
Field Value
_connected
Declaration
[NonSerialized]
protected Dictionary<Type, bool> _connected
Field Value
_readyToConnect
Declaration
[NonSerialized]
protected bool _readyToConnect
Field Value
Properties
mono
Declaration
public virtual MonoBehaviour mono { get; }
Property Value
| Type |
Description |
| UnityEngine.MonoBehaviour |
|
Methods
Awake()
Declaration
protected virtual void Awake()
Init()
Declaration
protected virtual void Init()
IsConnected<ST>()
Declaration
public virtual bool IsConnected<ST>()
where ST : Service<ST>
Returns
Type Parameters
OnDisable()
Declaration
protected virtual void OnDisable()
OnEnable()
Declaration
protected virtual void OnEnable()
OnLocaleChange(Locale)
Declaration
protected virtual void OnLocaleChange(Locale locale)
Parameters
| Type |
Name |
Description |
| Locale |
locale |
|
OnValidate()
Declaration
protected virtual void OnValidate()
Reconnect<ST>()
Declaration
public virtual void Reconnect<ST>()
where ST : Service<ST>
Type Parameters
RegisterToLocalization()
Declaration
protected virtual void RegisterToLocalization()
UnregisterFromLocalization()
Declaration
protected virtual void UnregisterFromLocalization()
UpdateComponent()
Called when the component need to update due to a change in the translation service
i.e. a language change or service coming online.
Declaration
public abstract void UpdateComponent()
Implements
IServiceComponent<>