# rawSampleIndex

> The raw index of a sample, i.e. the index as if would be used with RawFrameDataView and NOT an Item ID as it would be used with HierarchyFrameDataView.

## Definition

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

```csharp
public int rawSampleIndex { get; }
```

### Remarks

Note: When [HierarchyFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview.md) uses MergeSamplesWithTheSameName mode, Unity merges multiple samples with the same name at the same hierarchy level together in a single item.

As a result of this behavior, and the hierarchical structure of the samples in [HierarchyFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview.md), the **Hierarchy item identifiers** that [HierarchyFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview.md) uses, do not correspond to the **sample indices** that [RawFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/rawframedataview.md) uses. When working with [HierarchyFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview.md), use [HierarchyFrameDataView.GetItemRawFrameDataViewIndices](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview/getitemrawframedataviewindices.md) to get the sample indices in a format that works with [ProfilerTimeSampleSelection](/engine/6000.6/script-reference/unityeditor/profiling/profilertimesampleselection.md) and use [HierarchyFrameDataView.ItemContainsRawFrameDataViewIndex](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview/itemcontainsrawframedataviewindex.md) to check if a selected sample index corresponds to a HierarchyFrameDataView item..

Additional Resources: [ProfilerTimeSampleSelection.rawSampleIndices](/engine/6000.6/script-reference/unityeditor/profiling/profilertimesampleselection/rawsampleindices.md), [RawFrameDataView](/engine/6000.6/script-reference/unityeditor/profiling/rawframedataview.md), [HierarchyFrameDataView.GetItemRawFrameDataViewIndices](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview/getitemrawframedataviewindices.md) and [HierarchyFrameDataView.ItemContainsRawFrameDataViewIndex](/engine/6000.6/script-reference/unityeditor/profiling/hierarchyframedataview/itemcontainsrawframedataviewindex.md).
