Class LocalizedAssetBehaviour<TObject, TReference>
Base class for all asset localization components.
Inheritance
Inherited Members
Namespace: UnityEngine.Localization.Components
Syntax
public abstract class LocalizedAssetBehaviour<TObject, TReference> : MonoBehaviour where TObject : Object where TReference : LocalizedAsset<TObject>, new()
Type Parameters
Name | Description |
---|---|
TObject | |
TReference |
Properties
AssetReference
Reference to the localized asset entry and table.
Declaration
public TReference AssetReference { get; set; }
Property Value
Type | Description |
---|---|
TReference |
Methods
OnDisable()
Stops listening for changes to AssetReference.
Declaration
protected virtual void OnDisable()
OnEnable()
Starts listening for changes to AssetReference.
Declaration
protected virtual void OnEnable()
UpdateAsset(TObject)
Called whenever the localized asset is updated, such as when the Locale changes or when initializing.
Declaration
protected abstract void UpdateAsset(TObject localizedAsset)
Parameters
Type | Name | Description |
---|---|---|
TObject | localizedAsset |