Condition<T>
The base class for user-accessible conditions holding a value of type T.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Class
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
- Inherits from: Condition
- Implements: ICondition
public abstract class Condition<T> : Condition, ICondition
Remarks
Inherit from this class to define a custom condition type. The Condition<T>.Value field is serialized with the state machine and is displayed and edited in the transition inspector. To read the condition back from an asset, for example in an importer, cast the ICondition to the concrete derived type and read Condition<T>.Value and Condition<T>.Comparison. For a condition without a value, derive from Condition instead.
Fields
Value | Description |
|---|---|
| Value | The value of the condition. |
Properties
Property | Description |
|---|---|
| Comparison | The comparison operator applied to the condition's value. |
| DisplayComparisonDropdown | Whether the transition inspector displays a dropdown to select the condition's comparison operator. |
| SupportedComparisons | The comparison operators offered by the comparison dropdown. |