# PopulateContextMenu

> Raised when a right click is handled on a node or on the background of the HierarchyView.

## Definition

* **Type:** Event
* **Namespace:** [Unity.Hierarchy.Editor](/engine/6000.5/script-reference/unity/hierarchy/editor.md)
* **Assembly:** UnityEditor

```csharp
public static event HierarchyWindow.PopulateContextMenuEventHandler PopulateContextMenu
```

### Remarks

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