Method CreateAssetTableCollection
CreateAssetTableCollection(string, string)
Creates a AssetTableCollection using the project Locales.
Declaration
public static AssetTableCollection CreateAssetTableCollection(string tableName, string assetDirectory)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The Table Collection Name to use. |
string | assetDirectory | The directory to store the generated assets. |
Returns
Type | Description |
---|---|
AssetTableCollection | The created AssetTableCollection collection. |
Examples
This example shows how to update a collection by adding a new localized asset.
public static void AddAssetToCollection(Texture asset)
{
var collection = LocalizationEditorSettings.GetAssetTableCollection("My Assets");
if (collection == null)
{
collection = LocalizationEditorSettings.CreateAssetTableCollection("My Assets", "Assets/Asset Tables");
}
collection.AddAssetToTable(SystemLanguage.English, "My Texture", asset);
}
CreateAssetTableCollection(string, string, IList<Locale>)
Creates a AssetTableCollection using the provided Locales.
Declaration
public static AssetTableCollection CreateAssetTableCollection(string tableName, string assetDirectory, IList<Locale> selectedLocales)
Parameters
Type | Name | Description |
---|---|---|
string | tableName | The name of the new collection. Cannot be blank or whitespace, cannot contain invalid filename characters, and cannot contain "[]". |
string | assetDirectory | The directory to store the generated assets. |
IList<Locale> | selectedLocales | The locales to generate the collection with. A AssetTable will be created for each Locale |
Returns
Type | Description |
---|---|
AssetTableCollection | The created AssetTableCollection collection. |