Class LocalizationEditorSettings
Inheritance
System.Object
LocalizationEditorSettings
Syntax
public class LocalizationEditorSettings
Properties
ActiveLocalizationSettings
The LocalizationSettings used for this project.
Declaration
public static LocalizationSettings ActiveLocalizationSettings { get; set; }
Property Value
ActiveLocalizationSettingsInternal
Declaration
protected virtual LocalizationSettings ActiveLocalizationSettingsInternal { get; set; }
Property Value
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 Parameters
AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)
Declaration
protected virtual void AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
where TObject : Object
Parameters
Type Parameters
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
AddOrUpdateTableInternal(LocalizedTable)
Declaration
protected virtual void AddOrUpdateTableInternal(LocalizedTable table)
Parameters
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
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
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
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
FindUniqueAssetAddress(String)
Declaration
protected virtual string FindUniqueAssetAddress(string address)
Parameters
Type |
Name |
Description |
System.String |
address |
|
Returns
Type |
Description |
System.String |
|
Declaration
protected static string FormatAssetTableName(LocaleIdentifier localeIdentifier)
Parameters
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
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 Parameters
Name |
Description |
TLocalizedTable |
|
GetAssetTablesCollectionInternal<TLocalizedTable>()
Declaration
protected virtual List<AssetTableCollection> GetAssetTablesCollectionInternal<TLocalizedTable>()
where TLocalizedTable : LocalizedTable
Returns
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
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 Parameters
RemoveAssetFromTableInternal(AddressableAssetTable, UInt32, String)
Declaration
protected virtual void RemoveAssetFromTableInternal(AddressableAssetTable table, uint keyId, string assetGuid)
Parameters
RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject>, UInt32, TObject)
Declaration
protected virtual void RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject> table, uint keyId, TObject asset)
where TObject : Object
Parameters
Type Parameters
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
RemoveTableInternal(LocalizedTable)
Declaration
protected virtual void RemoveTableInternal(LocalizedTable table)
Parameters
SendEvent(LocalizationEditorSettings.ModificationEvent, Object)
Declaration
protected void SendEvent(LocalizationEditorSettings.ModificationEvent evt, object context)
Parameters
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