Class StringTableCollection
Provides methods for managing multiple StringTable in the Editor.
Implements
Inherited Members
Namespace: UnityEditor.Localization
Assembly: Unity.Localization.Editor.dll
Syntax
public class StringTableCollection : LocalizationTableCollection, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
DefaultGroupName | The default value to use for Group. |
RequiredExtensionAttribute | The required attribute for an extension to be added to this collection through the Editor. |
StringTables | A helper property which is the contents of Tables loaded and cast to StringTable. |
TableType | The type of table stored in the collection. |
Methods
Name | Description |
---|---|
ClearAllEntries() | Removes all the entries from SharedTableData and all Tables that are part of this collection. |
GenerateCharacterSet(params LocaleIdentifier[]) | Returns a string that contains all the unique characters that are used for all localized values in the tables that belong to the supplied LocaleIdentifier's. This will also include Smart String entries but will only consider the LiteralText values, it will not consider Placeholder values. |
GetRowEnumerator() | Returns an enumerator that can be used to step through each key and its localized values, such as in a foreach loop. Internally SharedTableData and StringTable's are separate assets with their own internal list of values. This means that when iterating through each key a lookup must be made in each table in order to retrieve the localized value, this can become slow when dealing with a large number of tables and entries. GetRowEnumerator improves this process by first sorting the multiple internal lists and then stepping through each conceptual row at a time. It handles missing keys and table entries and provides a more efficient and faster way to iterate through the tables. |
GetRowEnumerator(params StringTable[]) | Returns an enumerator that can be used to step through each key and its localized values, such as in a foreach loop. Internally SharedTableData and StringTable's are separate assets with their own internal list of values. This means that when iterating through each key a lookup must be made in each table in order to retrieve the localized value, this can become slow when dealing with a large number of tables and entries. GetRowEnumerator improves this process by first sorting the multiple internal lists and then stepping through each conceptual row at a time. It handles missing keys and table entries and provides a more efficient and faster way to iterate through the tables. |
GetRowEnumeratorUnsorted() | Returns an enumerator that can be used to step through each key and its localized values, such as in a foreach loop. This version does not sort the items by the Key Id but instead returns them in the order of the Entries. If the order of the rows is not important then using GetRowEnumerator() will provide better performance. |
RemoveEntry(TableEntryReference) | Removes the entry from the SharedTableData and all tables that are part of this collection. |