# ISubgraphState

> Interface for a specialized state that references a subgraph.

## Definition

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

```csharp
public interface ISubgraphState : IState
```

## Remarks

A subgraph state acts as an entry point to another graph embedded within a [StateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine.md). The referenced subgraph can be either a regular [Graph](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graph.md) or another [StateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine.md). The owning state machine must support subgraphs through [StateMachineOptions.SupportsSubgraphs](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachineoptions/supportssubgraphs.md).

See also:

* [IState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate.md) for the members shared with every other kind of state

## Methods

| Method                                                                                                                             | Description                                                                                                                                 |
| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetSubgraphAsGraph](/engine/6000.7/script-reference/unity/graphtoolkit/editor/isubgraphstate/getsubgraphasgraph.md)               | Retrieves the subgraph linked to this state as a [Graph](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graph.md).               |
| [GetSubgraphAsStateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/isubgraphstate/getsubgraphasstatemachine.md) | Retrieves the subgraph linked to this state as a [StateMachine](/engine/6000.7/script-reference/unity/graphtoolkit/editor/statemachine.md). |

## Inheritance

**Inherited Members:**

* [IState.RemoveFromStateMachine()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/removefromstatemachine.md)
* [IState.GetIncomingTransitions()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getincomingtransitions.md)
* [IState.GetOutgoingTransitions()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getoutgoingtransitions.md)
* [IState.GetOption(int)](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getoption.md)
* [IState.GetOptionByName(string)](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/getoptionbyname.md)
* [IState.Tooltip()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/tooltip.md)
* [IState.Title()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/title.md)
* [IState.Subtitle()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/subtitle.md)
* [IState.DefaultColor()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/defaultcolor.md)
* [IState.FillAmount()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/fillamount.md)
* [IState.ID()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/id.md)
* [IState.StateMachine()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/statemachine.md)
* [IState.IsConnected()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/isconnected.md)
* [IState.Position()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/position.md)
* [IState.OptionCount()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/optioncount.md)
* [IState.Options()](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate/options.md)
