# GetSampleMetadataAsInt(int, int)

> Gets sample metadata value as integer.

## Definition

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

```csharp
public int GetSampleMetadataAsInt(int sampleIndex, int metadataIndex)
```

### Parameters

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

### Returns

| Type                                                       | Description                                              |
| ---------------------------------------------------------- | -------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns integer representation of sample metadata value. |

### Remarks

Use to obtain additional data associated with the sample. *metadataIndex* must be between 0 and [RawFrameDataView.GetSampleMetadataCount](/engine/6000.6/script-reference/unityeditor/profiling/rawframedataview/getsamplemetadatacount.md).
