Method GetAllTables
GetAllTables(Locale)
Returns all the tables available. This method is asynchronous and may not have an immediate result. Check IsDone to see if the tables are available. if it is false then you can use the Completed event to get a callback when it is finished, yield on the operation or call WaitForCompletion to force the operation to complete.```
Declaration
public virtual AsyncOperationHandle<IList<TTable>> GetAllTables(Locale locale = null)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale | The Locale to load the table from, use null to default to cref="LocalizationSettings.SelectedLocale"/>. |
Returns
Type | Description |
---|---|
AsyncOperationHandle<IList<TTable>> |
Examples
This example gets all the tables and waits for the completion of the operation.
var tables = LocalizationSettings.StringDatabase.GetAllTables();
yield return tables;
foreach (var table in tables.Result)
{
Debug.Log("Loaded " + table.TableCollectionName);
}
This example gets all tables and uses WaitForCompletion to force the loading to complete synchronously.
var tables = LocalizationSettings.StringDatabase.GetAllTables();
tables.WaitForCompletion();
foreach (var table in tables.Result)
{
Debug.Log("Loaded " + table.TableCollectionName);
}