Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

public class Variable<T> : IVariableValueChanged, IVariable, ISerializationCallbackReceiver

Properties

Property

Description

ValueThe value for this variable. Changing this will trigger the Variable<T>.ValueChanged event.

Methods

Method

Description

ToStringReturns the string representation of this variable's value.

Events

Member

Description

ValueChangedRaised when Variable<T>.Value changes.