Class LocalizationAddressableSettings
Inheritance
System.Object
LocalizationAddressableSettings
Syntax
public class LocalizationAddressableSettings
Fields
AssetTableGroupName
Declaration
public const string AssetTableGroupName = "Localization-AssetTables"
Field Value
Type |
Description |
System.String |
|
AssetTableTypeGroupName
Declaration
public const string AssetTableTypeGroupName = "Localization-Assets-{0}"
Field Value
Type |
Description |
System.String |
|
LocaleGroupName
Declaration
public const string LocaleGroupName = "Localization-Locales"
Field Value
Type |
Description |
System.String |
|
StringTableGroupName
Declaration
public const string StringTableGroupName = "Localization-StringTables"
Field Value
Type |
Description |
System.String |
|
Methods
AddAssetToTable<TObject>(AddressableAssetTableT<TObject>, String, 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, string key, TObject asset)where TObject : Object
Parameters
Type |
Name |
Description |
AddressableAssetTableT<TObject> |
table |
|
System.String |
key |
|
TObject |
asset |
|
Type Parameters
AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject>, String, TObject)
Declaration
protected virtual void AddAssetToTableInternal<TObject>(AddressableAssetTableT<TObject> table, string key, TObject asset)where TObject : Object
Parameters
Type |
Name |
Description |
AddressableAssetTableT<TObject> |
table |
|
System.String |
key |
|
TObject |
asset |
|
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 bool AddLocale(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
Returns
Type |
Description |
System.Boolean |
True if the locale was added; false if it was not such as when the locale is already added or the
operation was canceled when creating the settings asset.
|
AddLocaleInternal(Locale)
Declaration
protected virtual bool AddLocaleInternal(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
Returns
Type |
Description |
System.Boolean |
|
AddOrUpdateAssetTable(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 AddOrUpdateAssetTable(LocalizedTable table)
Parameters
Type |
Name |
Description |
LocalizedTable |
table |
|
AddOrUpdateAssetTableInternal(LocalizedTable)
Declaration
protected virtual void AddOrUpdateAssetTableInternal(LocalizedTable table)
Parameters
Type |
Name |
Description |
LocalizedTable |
table |
|
FindUniqueAssetAddress(String)
Declaration
protected virtual string FindUniqueAssetAddress(string address)
Parameters
Type |
Name |
Description |
System.String |
address |
|
Returns
Type |
Description |
System.String |
|
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 |
List<Locale> |
|
GetLocalesInternal()
Declaration
protected virtual List<Locale> GetLocalesInternal()
Returns
Type |
Description |
List<Locale> |
|
RemoveAssetFromTable<TObject>(AddressableAssetTableT<TObject>, String, TObject)
Remove the asset mapping from the table and also cleanup the Addressables if necessary.
Declaration
public static void RemoveAssetFromTable<TObject>(AddressableAssetTableT<TObject> table, string key, TObject asset)where TObject : Object
Parameters
Type |
Name |
Description |
AddressableAssetTableT<TObject> |
table |
|
System.String |
key |
|
TObject |
asset |
|
Type Parameters
RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject>, String, TObject)
Declaration
protected virtual void RemoveAssetFromTableInternal<TObject>(AddressableAssetTableT<TObject> table, string key, TObject asset)where TObject : Object
Parameters
Type |
Name |
Description |
AddressableAssetTableT<TObject> |
table |
|
System.String |
key |
|
TObject |
asset |
|
Type Parameters
RemoveLocale(Locale)
Removes the locale from the Addressables system.
Declaration
public static bool RemoveLocale(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
Returns
Type |
Description |
System.Boolean |
True if success or false if the locale could not be removed, such as if it was not added.
|
RemoveLocaleInternal(Locale)
Declaration
protected virtual bool RemoveLocaleInternal(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
Returns
Type |
Description |
System.Boolean |
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.