Class LocalizationEditorSettings | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class LocalizationEditorSettings

    Inheritance
    System.Object
    LocalizationEditorSettings
    FakedAddressableLocalizationEditorSettings
    FakedLocalizationEditorSettings
    Namespace: UnityEditor.Localization
    Syntax
    public class LocalizationEditorSettings

    Properties

    ActiveLocalizationSettings

    The LocalizationSettings used for this project.

    Declaration
    public static LocalizationSettings ActiveLocalizationSettings { get; set; }
    Property Value
    Type Description
    LocalizationSettings
    Remarks

    The activeLocalizationSettings will be available in any player builds and the editor when playing. During a build or entering play mode, the asset will be added to the preloaded assets list. Note: This needs to be an asset.

    ActiveLocalizationSettingsInternal

    Declaration
    protected virtual LocalizationSettings ActiveLocalizationSettingsInternal { get; set; }
    Property Value
    Type Description
    LocalizationSettings

    Methods

    AddAssetToTable<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)

    Add a localized asset to the asset table. This function will ensure the localization system adds the asset to the Addressables system and sets the asset up for use.

    Declaration
    public static void AddAssetToTable<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
        where TObject : Object
    Parameters
    Type Name Description
    AddressableAssetTableT<TObject> table
    System.UInt32 keyId
    TObject asset
    Type Parameters
    Name Description
    TObject

    AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)

    Declaration
    protected virtual void AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
        where TObject : Object
    Parameters
    Type Name Description
    AddressableAssetTableT<TObject> table
    System.UInt32 keyId
    TObject asset
    Type Parameters
    Name Description
    TObject

    AddLocale(Locale)

    Add the Locale to the Addressables system, so that it can be used by the Localization system during runtime.

    Declaration
    public static void AddLocale(Locale locale)
    Parameters
    Type Name Description
    Locale locale

    AddLocaleInternal(Locale)

    Declaration
    protected virtual void AddLocaleInternal(Locale locale)
    Parameters
    Type Name Description
    Locale locale

    AddOrUpdateTable(LocalizedTable)

    Add or update the Addressables data for the table. Ensures the table is in the correct group and has all the required labels.

    Declaration
    public static void AddOrUpdateTable(LocalizedTable table)
    Parameters
    Type Name Description
    LocalizedTable table

    AddOrUpdateTableInternal(LocalizedTable)

    Declaration
    protected virtual void AddOrUpdateTableInternal(LocalizedTable table)
    Parameters
    Type Name Description
    LocalizedTable table

    CreateAsset(Object, String)

    Declaration
    protected virtual void CreateAsset(Object asset, string path)
    Parameters
    Type Name Description
    UnityEngine.Object asset
    System.String path

    CreateAssetTable(Locale, KeyDatabase, String, Type, String)

    Create a new AssetTable asset. This will create the table and ensure that the table is also added to the Addressables.

    Declaration
    public static LocalizedTable CreateAssetTable(Locale selectedLocales, KeyDatabase keyDatabase, string tableName, Type tableType, string assetPath)
    Parameters
    Type Name Description
    Locale selectedLocales

    The locale the table should be created for.

    KeyDatabase keyDatabase

    The Key Database for this table.

    System.String tableName

    The name of the table. Tables are collated by their type and name.

    System.Type tableType

    The type of table to create. Must inherit from LocalizedTable.

    System.String assetPath

    The path to save the asset to.

    Returns
    Type Description
    LocalizedTable

    CreateAssetTableFilePanelInternal(Locale, KeyDatabase, String, Type, String)

    Declaration
    protected virtual LocalizedTable CreateAssetTableFilePanelInternal(Locale selectedLocales, KeyDatabase keyDatabase, string tableName, Type tableType, string defaultDirectory)
    Parameters
    Type Name Description
    Locale selectedLocales
    KeyDatabase keyDatabase
    System.String tableName
    System.Type tableType
    System.String defaultDirectory
    Returns
    Type Description
    LocalizedTable

    CreateAssetTableInternal(Locale, KeyDatabase, String, Type, String)

    Declaration
    protected virtual LocalizedTable CreateAssetTableInternal(Locale selectedLocales, KeyDatabase keyDatabase, string tableName, Type tableType, string assetPath)
    Parameters
    Type Name Description
    Locale selectedLocales
    KeyDatabase keyDatabase
    System.String tableName
    System.Type tableType
    System.String assetPath
    Returns
    Type Description
    LocalizedTable

    CreateAssetTablesFolderPanelInternal(List<Locale>, KeyDatabase, String, Type)

    Declaration
    protected virtual void CreateAssetTablesFolderPanelInternal(List<Locale> selectedLocales, KeyDatabase keyDatabase, string tableName, Type tableType)
    Parameters
    Type Name Description
    System.Collections.Generic.List<Locale> selectedLocales
    KeyDatabase keyDatabase
    System.String tableName
    System.Type tableType

    CreateAssetTablesInternal(List<Locale>, KeyDatabase, String, Type, String, Boolean, Boolean)

    Declaration
    protected virtual List<LocalizedTable> CreateAssetTablesInternal(List<Locale> selectedLocales, KeyDatabase keyDatabase, string tableName, Type tableType, string assetDirectory, bool showProgressBar, bool showInTablesWindow)
    Parameters
    Type Name Description
    System.Collections.Generic.List<Locale> selectedLocales
    KeyDatabase keyDatabase
    System.String tableName
    System.Type tableType
    System.String assetDirectory
    System.Boolean showProgressBar
    System.Boolean showInTablesWindow
    Returns
    Type Description
    System.Collections.Generic.List<LocalizedTable>

    FindUniqueAssetAddress(String)

    Declaration
    protected virtual string FindUniqueAssetAddress(string address)
    Parameters
    Type Name Description
    System.String address
    Returns
    Type Description
    System.String

    FormatAssetTableName(LocaleIdentifier)

    Declaration
    protected static string FormatAssetTableName(LocaleIdentifier localeIdentifier)
    Parameters
    Type Name Description
    LocaleIdentifier localeIdentifier
    Returns
    Type Description
    System.String

    GetAddressableAssetSettings(Boolean)

    Declaration
    protected virtual AddressableAssetSettings GetAddressableAssetSettings(bool create)
    Parameters
    Type Name Description
    System.Boolean create
    Returns
    Type Description
    AddressableAssetSettings

    GetAllAssetTables()

    Returns all asset tables in the project.

    Declaration
    public static List<LocalizedTable> GetAllAssetTables()
    Returns
    Type Description
    System.Collections.Generic.List<LocalizedTable>

    GetAssetTables<TLocalizedTable>()

    Returns all asset tables in the project of type TLocalizedTable.

    Declaration
    public static List<TLocalizedTable> GetAssetTables<TLocalizedTable>()
        where TLocalizedTable : LocalizedTable
    Returns
    Type Description
    System.Collections.Generic.List<TLocalizedTable>
    Type Parameters
    Name Description
    TLocalizedTable

    GetAssetTablesCollection<TLocalizedTable>()

    Returns all asset tables in the project sorted by type and table name.

    Declaration
    public static List<AssetTableCollection> GetAssetTablesCollection<TLocalizedTable>()
        where TLocalizedTable : LocalizedTable
    Returns
    Type Description
    System.Collections.Generic.List<AssetTableCollection>
    Type Parameters
    Name Description
    TLocalizedTable

    GetAssetTablesCollectionInternal<TLocalizedTable>()

    Declaration
    protected virtual List<AssetTableCollection> GetAssetTablesCollectionInternal<TLocalizedTable>()
        where TLocalizedTable : LocalizedTable
    Returns
    Type Description
    System.Collections.Generic.List<AssetTableCollection>
    Type Parameters
    Name Description
    TLocalizedTable

    GetAssetTablesInternal<TLocalizedTable>()

    Declaration
    protected virtual List<TLocalizedTable> GetAssetTablesInternal<TLocalizedTable>()
        where TLocalizedTable : LocalizedTable
    Returns
    Type Description
    System.Collections.Generic.List<TLocalizedTable>
    Type Parameters
    Name Description
    TLocalizedTable

    GetGroup(AddressableAssetSettings, String, Boolean)

    Declaration
    protected virtual AddressableAssetGroup GetGroup(AddressableAssetSettings settings, string groupName, bool create = false)
    Parameters
    Type Name Description
    AddressableAssetSettings settings
    System.String groupName
    System.Boolean create
    Returns
    Type Description
    AddressableAssetGroup

    GetLocales()

    Returns all locales that are part of the Addressables system.

    Declaration
    public static List<Locale> GetLocales()
    Returns
    Type Description
    System.Collections.Generic.List<Locale>

    GetLocalesInternal()

    Declaration
    protected virtual List<Locale> GetLocalesInternal()
    Returns
    Type Description
    System.Collections.Generic.List<Locale>

    RemoveAssetFromTable(AddressableAssetTable, UInt32, String)

    Remove the asset mapping from the table and also cleanup the Addressables if necessary.

    Declaration
    public static void RemoveAssetFromTable(AddressableAssetTable table, uint keyId, string assetGuid)
    Parameters
    Type Name Description
    AddressableAssetTable table
    System.UInt32 keyId
    System.String assetGuid

    RemoveAssetFromTable<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)

    Remove the asset mapping from the table and also cleanup the Addressables if necessary.

    Declaration
    public static void RemoveAssetFromTable<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
        where TObject : Object
    Parameters
    Type Name Description
    AddressableAssetTableT<TObject> table
    System.UInt32 keyId
    TObject asset
    Type Parameters
    Name Description
    TObject

    RemoveAssetFromTableInternal(AddressableAssetTable, UInt32, String)

    Declaration
    protected virtual void RemoveAssetFromTableInternal(AddressableAssetTable table, uint keyId, string assetGuid)
    Parameters
    Type Name Description
    AddressableAssetTable table
    System.UInt32 keyId
    System.String assetGuid

    RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)

    Declaration
    protected virtual void RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
        where TObject : Object
    Parameters
    Type Name Description
    AddressableAssetTableT<TObject> table
    System.UInt32 keyId
    TObject asset
    Type Parameters
    Name Description
    TObject

    RemoveLocale(Locale)

    Removes the locale from the Addressables system.

    Declaration
    public static void RemoveLocale(Locale locale)
    Parameters
    Type Name Description
    Locale locale

    RemoveLocaleInternal(Locale)

    Declaration
    protected virtual void RemoveLocaleInternal(Locale locale)
    Parameters
    Type Name Description
    Locale locale

    RemoveTable(LocalizedTable)

    Remove the table from Addressables and any associated assets if they are not used elsewhere.

    Declaration
    public static void RemoveTable(LocalizedTable table)
    Parameters
    Type Name Description
    LocalizedTable table

    RemoveTableInternal(LocalizedTable)

    Declaration
    protected virtual void RemoveTableInternal(LocalizedTable table)
    Parameters
    Type Name Description
    LocalizedTable table

    SendEvent(LocalizationEditorSettings.ModificationEvent, Object)

    Declaration
    protected void SendEvent(LocalizationEditorSettings.ModificationEvent evt, object context)
    Parameters
    Type Name Description
    LocalizationEditorSettings.ModificationEvent evt
    System.Object context

    UpdateAssetGroup(AddressableAssetSettings, AddressableAssetEntry)

    Declaration
    protected virtual void UpdateAssetGroup(AddressableAssetSettings settings, AddressableAssetEntry assetEntry)
    Parameters
    Type Name Description
    AddressableAssetSettings settings
    AddressableAssetEntry assetEntry

    Events

    OnModification

    Event sent when modifications are made to Localization assets and Addressables.

    Declaration
    public static event LocalizationEditorSettings.Modification OnModification
    Event Type
    Type Description
    LocalizationEditorSettings.Modification
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023