Class VariablesGroupAsset
Collection of IVariable that can be used during formatting of a localized string.
Inherited Members
Namespace: UnityEngine.Localization.SmartFormat.PersistentVariables
Assembly: Unity.Localization.dll
Syntax
[CreateAssetMenu(menuName = "Localization/Variables Group")]
public class VariablesGroupAsset : ScriptableObject, IVariableGroup, IVariable, ISerializationCallbackReceiver
Properties
Name | Description |
---|---|
Count | Returns the number of variables in the group. |
IsReadOnly | Implemented as part of IDictionary but not used. Always returns false. |
this[string] | Gets or sets the IVariable with the specified name. |
Keys | Returns a collection containing all the unique variable names. |
Values | Returns all the variables for this group. |
Methods
Name | Description |
---|---|
Add(KeyValuePair<string, IVariable>) | Adds a new Global Variable to use during formatting. |
Add(string, IVariable) | Adds a new Global Variable to use during formatting. |
Clear() | Removes all variables in the group. |
Contains(KeyValuePair<string, IVariable>) | Returns true if a variable with the specified name exists. |
ContainsKey(string) | Returns true if a variable with the specified name exists. |
ContainsName(string) | Returns true if a variable with the specified name exists. |
CopyTo(KeyValuePair<string, IVariable>[], int) | Copies the variables into an array starting at |
GetEnumerator() | Returns an enumerator for all variables in this group. |
GetSourceValue(ISelectorInfo) | The value that will be used when the smart string matches this variable. This value can then be further used by additional sources/formatters. |
Remove(KeyValuePair<string, IVariable>) | Removes a variable with the specified key. |
Remove(string) | Removes a variable with the specified name. |
TryGetValue(string, out IVariable) | Gets the IVariable with the specified name. |