# ClickedObject

> The element directly under the cursor at the time of the right-click, or null when the click landed on empty space or on an element that is not exposed through the public API.

## Definition

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

```csharp
public object ClickedObject { get; }
```

### Remarks

Test the runtime type to filter on a specific element kind, for example `context.ClickedObject is INode node`. Depending on the surface the handler is registered for, the value can be an [INode](/engine/6000.7/script-reference/unity/graphtoolkit/editor/inode.md), an [IPort](/engine/6000.7/script-reference/unity/graphtoolkit/editor/iport.md), a [Wire](/engine/6000.7/script-reference/unity/graphtoolkit/editor/wire.md), an [IVariable](/engine/6000.7/script-reference/unity/graphtoolkit/editor/ivariable.md), an [IState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate.md), an [ITransition](/engine/6000.7/script-reference/unity/graphtoolkit/editor/itransition.md) or an [ICondition](/engine/6000.7/script-reference/unity/graphtoolkit/editor/icondition.md). A subgraph state is an [ISubgraphState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/isubgraphstate.md), which derives from [IState](/engine/6000.7/script-reference/unity/graphtoolkit/editor/istate.md).

Elements with no public representation, such as placemats and sticky notes, also report `null`, so a `null` value does not guarantee the click landed on nothing.
