ValueReference<TValue, TVariable>


public abstract class ValueReference<TValue, TVariable>
    where TVariable : ScriptableVariable<TValue>


A reference to a value of the specified type, either a fixed value or a variable.

Type Parameters

TValueThe type of value.
TVariableThe type of variable reference.


useVariableUses a variable reference instead of a fixed value.
variableThe variable to reference.
fixedValueThe fixed value to use.
valueThe current value, either the fixed value or the value of the referenced variable.


ValueReferenceCreates a new value reference.


SetFixedValueSwitches to use a fixed value and assigns the provided value.
SetVariableSwitches to use a variable reference and assigns the provided variable.