Class LocalizationEditorSettings
Editor interface for modifying Localization settings and Localization based Addressables properties.
Inheritance
LocalizationEditorSettings
Syntax
public class LocalizationEditorSettings
Constructors
LocalizationEditorSettings()
Declaration
public 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
EditorEvents
Localization modification events.
Declaration
public static LocalizationEditorEvents EditorEvents { get; }
Property Value
During play mode, in the editor a menu can be shown to allow for quickly changing the SelectedLocale.
Declaration
public static bool ShowLocaleMenuInGameView { get; set; }
Property Value
Methods
AddLocale(Locale, Boolean)
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, bool createUndo = false)
Parameters
Type |
Name |
Description |
Locale |
locale |
The Locale to add to Addressables so that it can be used by the Localization system.
|
Boolean |
createUndo |
Used to indicate if an Undo operation should be created.
|
AddLocaleInternal(Locale, Boolean)
Declaration
protected virtual void AddLocaleInternal(Locale locale, bool createUndo)
Parameters
CreateAssetTableCollection(String, String)
Declaration
public static AssetTableCollection CreateAssetTableCollection(string tableName, string assetDirectory)
Parameters
Type |
Name |
Description |
String |
tableName |
The name of the new collection.
|
String |
assetDirectory |
The directory to save the generated assets, must be in the project Assets directory.
|
Returns
CreateAssetTableCollection(String, String, IList<Locale>)
Declaration
public static AssetTableCollection CreateAssetTableCollection(string tableName, string assetDirectory, IList<Locale> selectedLocales)
Parameters
Type |
Name |
Description |
String |
tableName |
|
String |
assetDirectory |
|
IList<Locale> |
selectedLocales |
The locales to generate the collection with. A AssetTable will be created for each Locale
|
Returns
CreateCollection(Type, String, String, IList<Locale>)
Declaration
protected virtual LocalizationTableCollection CreateCollection(Type collectionType, string tableName, string assetDirectory, IList<Locale> selectedLocales)
Parameters
Returns
CreateCollectionFromLooseTables(IList<LocalizationTable>, String)
Declaration
public static LocalizationTableCollection CreateCollectionFromLooseTables(IList<LocalizationTable> looseTables, string path)
Parameters
Type |
Name |
Description |
IList<LocalizationTable> |
looseTables |
Tables to create the collection from. All tables must be of the same type.
|
String |
path |
|
Returns
CreateCollectionFromLooseTablesInternal(IList<LocalizationTable>, String)
Declaration
protected virtual LocalizationTableCollection CreateCollectionFromLooseTablesInternal(IList<LocalizationTable> looseTables, string path)
Parameters
Returns
CreateStringTableCollection(String, String)
Declaration
public static StringTableCollection CreateStringTableCollection(string tableName, string assetDirectory)
Parameters
Type |
Name |
Description |
String |
tableName |
The name of the new collection.
|
String |
assetDirectory |
The directory to save the generated assets, must be in the project Assets directory.
|
Returns
CreateStringTableCollection(String, String, IList<Locale>)
Declaration
public static StringTableCollection CreateStringTableCollection(string tableName, string assetDirectory, IList<Locale> selectedLocales)
Parameters
Type |
Name |
Description |
String |
tableName |
The name of the new collection.
|
String |
assetDirectory |
The directory to save the generated assets, must be in the project Assets directory.
|
IList<Locale> |
selectedLocales |
The locales to generate the collection with. A StringTable will be created for each Locale.
|
Returns
Finalize()
Declaration
protected void Finalize()
FindLooseStringTablesUsingSharedTableData(SharedTableData, IList<LocalizationTable>)
Declaration
public static void FindLooseStringTablesUsingSharedTableData(SharedTableData sharedTableData, IList<LocalizationTable> foundTables)
Parameters
FindSimilarKey(String)
Returns the AssetTableCollection that contains a table entry with the closest match to the provided text.
Uses the Levenshtein distance method.
Declaration
public static (StringTableCollection collection, SharedTableData.SharedTableEntry entry, int matchDistance) FindSimilarKey(string keyName)
Parameters
Type |
Name |
Description |
String |
keyName |
|
Returns
FindSimilarKeyInternal(String)
Declaration
protected virtual (StringTableCollection collection, SharedTableData.SharedTableEntry entry, int matchDistance) FindSimilarKeyInternal(string keyName)
Parameters
Type |
Name |
Description |
String |
keyName |
|
Returns
FindUniqueAssetAddress(String)
Tries to find a unique address for the asset to be stored in Addressables.
Declaration
protected virtual string FindUniqueAssetAddress(string address)
Parameters
Type |
Name |
Description |
String |
address |
|
Returns
GetAssetTableCollection(TableReference)
Declaration
public static AssetTableCollection GetAssetTableCollection(TableReference tableNameOrGuid)
Parameters
Returns
GetAssetTableCollections()
Declaration
public static ReadOnlyCollection<AssetTableCollection> GetAssetTableCollections()
Returns
GetCollectionForSharedTableData(SharedTableData)
Declaration
public static LocalizationTableCollection GetCollectionForSharedTableData(SharedTableData sharedTableData)
Parameters
Returns
GetCollectionFromTable(LocalizationTable)
Declaration
public static LocalizationTableCollection GetCollectionFromTable(LocalizationTable table)
Parameters
Returns
GetGroup(AddressableAssetSettings, String, Boolean, Boolean)
Returns the Addressables group with the matching name or creates a new one, if one could not be found.
Declaration
protected virtual AddressableAssetGroup GetGroup(AddressableAssetSettings settings, string groupName, bool create, bool createUndo)
Parameters
Returns
GetLocale(String)
Returns the locale for the code if it exists in the project.
Declaration
public static Locale GetLocale(string code)
Parameters
Type |
Name |
Description |
String |
code |
|
Returns
GetLocaleInternal(String)
Declaration
protected virtual Locale GetLocaleInternal(string code)
Parameters
Type |
Name |
Description |
String |
code |
|
Returns
GetLocales()
Returns all locales that are part of the Addressables system.
Declaration
public static ReadOnlyCollection<Locale> GetLocales()
Returns
GetLocalesInternal()
Declaration
protected virtual ReadOnlyCollection<Locale> GetLocalesInternal()
Returns
GetPreloadTableFlag(LocalizationTable)
Returns true if the table is marked for preloading.
Declaration
public static bool GetPreloadTableFlag(LocalizationTable table)
Parameters
Returns
GetPreloadTableFlagInternal(LocalizationTable)
Declaration
protected virtual bool GetPreloadTableFlagInternal(LocalizationTable table)
Parameters
Returns
Exceptions
GetStringTableCollection(TableReference)
Declaration
public static StringTableCollection GetStringTableCollection(TableReference tableNameOrGuid)
Parameters
Returns
GetStringTableCollections()
Declaration
public static ReadOnlyCollection<StringTableCollection> GetStringTableCollections()
Returns
GetUniqueCollectionName(Type, String)
Declaration
protected string GetUniqueCollectionName(Type collectionType, string name)
Parameters
Type |
Name |
Description |
Type |
collectionType |
|
String |
name |
|
Returns
RemoveLocale(Locale, Boolean)
Removes the locale from the Addressables system.
Declaration
public static void RemoveLocale(Locale locale, bool createUndo = false)
Parameters
Type |
Name |
Description |
Locale |
locale |
The Locale to remove from Addressables so that it is no longer used by the Localization system.
|
Boolean |
createUndo |
Used to indicate if an Undo operation should be created.
|
RemoveLocaleInternal(Locale, Boolean)
Declaration
protected virtual void RemoveLocaleInternal(Locale locale, bool createUndo)
Parameters
SetPreloadTableFlag(LocalizationTable, Boolean, Boolean)
Adds/Removes the preload flag for the table.
Declaration
public static void SetPreloadTableFlag(LocalizationTable table, bool preload, bool createUndo = false)
Parameters
SetPreloadTableInternal(LocalizationTable, Boolean, Boolean)
Declaration
protected virtual void SetPreloadTableInternal(LocalizationTable table, bool preload, bool createUndo = false)
Parameters
Exceptions
Extension Methods