# Next

> Use for the flow continuation point.

## Definition

* **Type:** Field
* **Namespace:** [Unity.Profiling](/engine/6000.5/script-reference/unity/profiling.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
Next = 3
```

### Remarks

An example of a flow start point is job scheduling. For instance, [IJobExtensions.Schedule](/engine/6000.5/script-reference/unity/jobs/ijobextensions/schedule.md) generates an implicit [ProfilerFlowEventType.Begin](/engine/6000.5/script-reference/unity/profiling/profilerfloweventtype/begin.md) Profiler flow event and [IJob.Execute](/engine/6000.5/script-reference/unity/jobs/ijob/execute.md) generates an implicit [ProfilerFlowEventType.Next](/engine/6000.5/script-reference/unity/profiling/profilerfloweventtype/next.md) event.

```csharp
using System;
using System.Threading;
using Unity.Profiling;
using Unity.Profiling.LowLevel;
using Unity.Profiling.LowLevel.Unsafe;

public class Example
{
    static readonly ProfilerMarker k_ScheduleTasksMarker = new ProfilerMarker("Schedule Task");
    static readonly ProfilerMarker k_TaskMarker = new ProfilerMarker("Task");

    static void EmitFlowEventAndChainThread(uint flowId)
    {
        // Mark the next k_TaskMarker as a beginning of the flow
        ProfilerUnsafeUtility.FlowEvent(flowId, ProfilerFlowEventType.Next);
        using (k_TaskMarker.Auto())
        {
            // Do work
        }
    }

    static void ScheduleTask()
    {
        using (k_ScheduleTasksMarker.Auto())
        {
            var flowId = ProfilerUnsafeUtility.CreateFlow(ProfilerUnsafeUtility.CategoryScripts);
            // Mark the parent k_ScheduleTasksMarker as a beginning of the flow
            ProfilerUnsafeUtility.FlowEvent(flowId, ProfilerFlowEventType.Begin);
            var thread = new Thread(() => EmitFlowEventAndChainThread(flowId));
            thread.Start();
        }
    }
}
```

Additional Resources: [ProfilerUnsafeUtility.FlowEvent](/engine/6000.5/script-reference/unity/profiling/lowlevel/unsafe/profilerunsafeutility/flowevent.md).
