# GetSampleMetadataAsSpan<T>(int, int)

> Returns Span\<T\> representation of sample metadata.

## Definition

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

```csharp
public Span<T> GetSampleMetadataAsSpan<T>(int sampleIndex, int metadataIndex) where T : unmanaged
```

### 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                                                      |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| [Span\<T>](https://learn.microsoft.com/dotnet/api/system.span-1) | Returns Span\\\<T\\> of the metadata associated with the sample. |

### 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).
