/ProfilerMarker API guide//
Use ProfilerMarker to mark up resource-intensive script code blocks and make them visible in the Unity Profiler.
This can be useful because by default, the built-in Unity Profiler does not profile all method calls. Also, if you enable Deep Profiling, it causes a large overhead that significantly slows down your application execution and skews the results.
To use the ProfilerMarker API, start your code with ProfilerMarker.Begin()
and end it with ProfilerMarker.End()
like the following:
using UnityEngine;
using Unity.Profiling;
public class Profile