# GetSampleChildrenCountRecursive(int)

> Gets amount of direct and indirect child samples for the specific sample.

## Definition

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

```csharp
public int GetSampleChildrenCountRecursive(int sampleIndex)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Index of the Profiler sample.

### Returns

| Type                                                       | Description                                          |
| ---------------------------------------------------------- | ---------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns amount of direct and indirect child samples. |

### Remarks

Use to quickly advance to the next sibling sample.

### Examples

```csharp
using UnityEditor.Profiling;

public class Example
{
    public static int SkipAllChildren(RawFrameDataView frameData, int sampleIndex)
    {
        return frameData.GetSampleChildrenCountRecursive(sampleIndex) + sampleIndex + 1;
    }
}
```
