# GetDestroyGameObjectHierarchyEvent(int, out DestroyGameObjectHierarchyEventArgs)

> Retrieves the event data at the given index as a DestroyGameObjectHierarchyEventArgs. Throws an exception if the event type requested does not match the event stored in the stream.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

## GetDestroyGameObjectHierarchyEvent(int, DestroyGameObjectHierarchyEventArgs)

```csharp
public void GetDestroyGameObjectHierarchyEvent(int eventIdx, out DestroyGameObjectHierarchyEventArgs data)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the event to get the data for.**** (\[DestroyGameObjectHierarchyEventArgs]\(/engine/6000.7/script-reference/unityeditor/destroygameobjecthierarchyeventargs)): The data associated with the event.
