# enabled

> Enables recording.

## Definition

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

```csharp
public bool enabled { get; set; }
```

### Remarks

When enabled Recorder collects data regardless of Profiler being enabled or not.

**Note:**

Set to *false* to make measurements available immediately for synchronous testing scenarious.

### Examples

```csharp
using UnityEngine;
using UnityEngine.Profiling;

public class Example
{
    public static void TimeSynchronousMethodWithMarkers()
    {
        var recorder = Recorder.Get("MyMarker");
        recorder.enabled = true; // Starts measurements

        // Call method which uses MyMarker
        // MyMethod();

        recorder.enabled = false; // Stops measurements and makes data available immediately
        Debug.Log("MyMarker total time, ns: " + recorder.elapsedNanoseconds);
    }
}
```
