docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LocalizedAssetBase

    Base class for all localized assets.

    Inheritance
    object
    LocalizedReference
    LocalizedAssetBase
    LocalizedAsset<TObject>
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    LocalizedReference.m_CurrentTable
    LocalizedReference.m_CurrentTableEntry
    LocalizedReference.TableReference
    LocalizedReference.TableEntryReference
    LocalizedReference.FallbackState
    LocalizedReference.LocaleOverride
    LocalizedReference.WaitForCompletion
    LocalizedReference.IsEmpty
    LocalizedReference.SetReference(TableReference, TableEntryReference)
    LocalizedReference.ForceUpdate()
    LocalizedReference.Reset()
    Namespace: UnityEngine.Localization
    Assembly: Unity.Localization.dll
    Syntax
    public abstract class LocalizedAssetBase : LocalizedReference, ISerializationCallbackReceiver

    Methods

    Name Description
    LoadAssetAsObjectAsync()

    Returns the localized asset as a UnityEngine.Object.

    LoadAssetAsync<TObject>()

    Overrides the asset's default type. This loads a type from AssetTable with the TableReference and the the asset that matchesTableEntryReference. This helps to filter sub-assets when trying to load them and they share a common type among other sub-assets with the same name.
    For example, an asset could have the following structure:
    Main Asset [GameObject]
    - Sub Asset[GameObject]
    - Sub Asset[Mesh] If you were using a LocalizedObject, callingLoadAsset orLoadAssetAsObjectAsync() to load "Main Asset/Sub Asset" would return the first matching asset. In this case, this would be the GameObject version. With this method, you could provide the type Mesh to filter out the GameObject version and return the Mesh.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)