# RemoveRule(ITransitionRule)

> Removes a rule from this transition.

## Definition

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

```csharp
void RemoveRule(ITransitionRule rule)
```

### Parameters

**** (\[ITransitionRule]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransitionrule)): The rule to remove. Must belong to this transition.

### Remarks

A transition always keeps at least one rule. To remove all rules, use [StateMachine.Disconnect](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine/disconnect.md) instead. Throws ArgumentNullException when `rule` is `null`. Throws ArgumentException when `rule` does not belong to this transition. Throws InvalidOperationException when `rule` is the last rule of this transition.
