# ProfilerUnsafeUtility

> Utility class which provides access to low level Profiler API.

## Definition

* **Type:** Class
* **Namespace:** [Unity.Profiling.LowLevel.Unsafe](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static class ProfilerUnsafeUtility
```

## Remarks

Use *ProfilerUnsafeUtility* methods to build a high-level profiling primitive.

The low level Profiler API is included in a Release Build.

## Static Fields

| Value                                                                                                                                         | Description                                 |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| [CategoryAi](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryai.md)                             | AI and NavMesh Profiler category.           |
| [CategoryAllocation](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryallocation.md)             | Memory allocation Profiler category.        |
| [CategoryAnimation](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryanimation.md)               | Animation Profiler category.                |
| [CategoryAudio](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryaudio.md)                       | Audio system Profiler category.             |
| [CategoryFileIO](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryfileio.md)                     | File IO Profiler category.                  |
| [CategoryGUI](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categorygui.md)                           | UI Profiler category.                       |
| [CategoryInput](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryinput.md)                       | Input system Profiler category.             |
| [CategoryInternal](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryinternal.md)                 | Internal Unity systems Profiler category.   |
| [CategoryLighting](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categorylighting.md)                 | Global Illumination Profiler category.      |
| [CategoryLoading](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryloading.md)                   | Loading system Profiler category.           |
| [CategoryNetwork](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categorynetwork.md)                   | Networking system Profiler category.        |
| [CategoryOther](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryother.md)                       | Uncategorized Profiler category.            |
| [CategoryParticles](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryparticles.md)               | Particle system Profiler category.          |
| [CategoryPhysics](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryphysics.md)                   | Physics system Profiler category.           |
| [CategoryPhysics2D](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryphysics2d.md)               | Physics 2D system Profiler category.        |
| [CategoryRender](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryrender.md)                     | Rendering system Profiler category.         |
| [CategoryScripts](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryscripts.md)                   | Generic C# code Profiler category.          |
| [CategoryVideo](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryvideo.md)                       | Video system Profiler category.             |
| [CategoryVirtualTexturing](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryvirtualtexturing.md) | Virtual Texturing system Profiler category. |
| [CategoryVr](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/categoryvr.md)                             | VR systen Profiler category.                |

## Static Properties

| Property                                                                                                                                                                | Description                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [Timestamp](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/timestamp.md)                                                         | Gets Profiler timestamp.                                      |
| [TimestampToNanosecondsConversionRatio](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/timestamptonanosecondsconversionratio.md) | Gets conversion ratio from Profiler timestamp to nanoseconds. |

## Static Methods

| Method                                                                                                                                        | Description                                                                                                                                                              |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [BeginSample](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/beginsample.md)                           | Starts profiling a piece of code marked with a custom name that the *markerPtr* handle has defined.                                                                      |
| [BeginSampleWithMetadata](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/beginsamplewithmetadata.md)   | Starts profiling a piece of code marked with a custom name that the *markerPtr* handle and metadata parameters has defined.                                              |
| [CreateFlow](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/createflow.md)                             | Create a new Profiler flow identifier.                                                                                                                                   |
| [CreateMarker](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/createmarker.md)                         | Constructs a new Profiler marker handle for code instrumentation.                                                                                                        |
| [EndSample](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/endsample.md)                               | End profiling a piece of code marked with a custom name defined by this instance of [ProfilerMarker](/engine/6000.0/script-reference/unity/profiling/profilermarker.md). |
| [FlowEvent](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/flowevent.md)                               | Add flow event to a Profiler sample.                                                                                                                                     |
| [GetCategoryByName](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/getcategorybyname.md)               | Gets the Profiler category identifier.                                                                                                                                   |
| [GetCategoryDescription](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/getcategorydescription.md)     | Retrieves Profiler category information such as name or color.                                                                                                           |
| [SetMarkerMetadata](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/setmarkermetadata.md)               | Set Profiler marker metadata name and type.                                                                                                                              |
| [SingleSampleWithMetadata](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/singlesamplewithmetadata.md) | Creates profiling sample with a custom name that the *markerPtr* handle and metadata parameters has defined.                                                             |

## Structs

| Struct                                                                                                                                                              | Description                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [ProfilerUnsafeUtility.TimestampConversionRatio](/engine/6000.0/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/timestampconversionratio.md) | Fraction that converts the Profiler timestamp to nanoseconds. |
