Variable<T>
Base class for all single source variables. Inherit from this class for storage for a single serialized source value that will send a value changed event when Variable<T>.Value is changed. This will trigger any localized string that is currently using the variable to update.
Read time 1 minuteLast updated 5 days ago
Definition
- Type: Class
- Namespace: Unity.SmartStrings.PersistentVariables
- Assembly: UnityEngine.SmartStringsModule
- Implements: IVariableValueChanged, IVariable, ISerializationCallbackReceiver
public class Variable<T> : IVariableValueChanged, IVariable, ISerializationCallbackReceiver
Properties
Property | Description |
|---|---|
| Value | The value for this variable. Changing this will trigger the Variable<T>.ValueChanged event. |
Methods
Method | Description |
|---|---|
| ToString | Returns the string representation of this variable's value. |
Events
Member | Description |
|---|---|
| ValueChanged | Raised when Variable<T>.Value changes. |