unity3d Unity Profiler Profiler Markup


Using the Profiler Class

One very good practice is to use Profiler.BeginSample and Profiler.EndSample because it will have its own entry in the Profiler Window.

Also, those tag will be stripped out on non-Development build using using ConditionalAttribute, so you don't need to remove them from your code.

public class SomeClass : MonoBehaviour 
    void SomeFunction() 
        // Various call made here

This will create an Entry "SomeClass.SomeFunction" in the Profiler Window that will allow easier debugging and identification of Bottle neck.