Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IVariableCondition

Interface for the built-in condition that compares a graph variable against a constant value.
Read time 1 minuteLast updated 12 days ago

Definition

public interface IVariableCondition : ICondition

Remarks

A variable condition records the variable to compare, the comparison operator, and the constant value to compare against; it does not evaluate them. When traversing a transition's condition tree with IGroupCondition.Get, test each element for this interface to read variable conditions. IVariableCondition.Variable and IVariableCondition.Value are
null
when no variable is assigned to the condition or when the assigned variable was deleted from the graph. This interface is implemented by Unity and is not intended to be implemented by user code.

Properties

Property

Description

ComparisonThe comparison operator applied between the variable and IVariableCondition.Value.
ValueThe constant value the variable is compared against, boxed as Object, or
null
when no variable is assigned.
VariableThe variable the condition compares, or
null
when no variable is assigned or the variable was deleted from the graph.

Inheritance