# ICondition

> Interface for a condition attached to a state machine transition.

## Definition

* **Type:** Interface
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

```csharp
public interface ICondition
```

## Remarks

A transition is taken only when its conditions are met. Conditions are organized in groups: every transition has a root group condition, and each group combines its nested conditions with a logical operation. Use [IGroupCondition](/engine/6000.7/script-reference/unity/graphtoolkit/editor/igroupcondition.md) to traverse the condition hierarchy from the root group. This interface is not intended to be implemented by user code; to author a custom condition, derive from [Condition\<T>](/engine/6000.7/script-reference/unity/graphtoolkit/editor/condition1.md) instead.

## Properties

| Property                                                                             | Description                                                                                  |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------- |
| [Icon](/engine/6000.7/script-reference/unity/graphtoolkit/editor/icondition/icon.md) | The icon displayed for this condition in the transition inspector, or `null` if none is set. |
| [ID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/icondition/id.md)     | The globally unique identifier for this condition.                                           |
| [Rule](/engine/6000.7/script-reference/unity/graphtoolkit/editor/icondition/rule.md) | The rule this condition belongs to, or `null` when the condition is not part of one.         |
