# PopulateContextMenu

> Raised when a right click is handled on a HierarchyNode or on the background of the view.

## Definition

* **Type:** Event
* **Namespace:** [Unity.Hierarchy](/engine/6000.6/script-reference/unity/hierarchy.md)
* **Assembly:** UnityEngine.HierarchyModule

```csharp
public event HierarchyView.PopulateContextMenuEventHandler PopulateContextMenu
```

### Remarks

This callback receives the [HierarchyView](/engine/6000.6/script-reference/unity/hierarchy/hierarchyview.md) and the [HierarchyViewItem](/engine/6000.6/script-reference/unity/hierarchy/hierarchyviewitem.md) to create the context menu for, and the [DropdownMenu](/engine/6000.6/script-reference/unityengine/uielements/dropdownmenu.md) to populate. If the user right-clicks in empty space, the callback receives null for the view item.
