Documentation

Unity Engine

Download Unity

Unity Engine

IgnoredByDeepProfilerAttribute

IgnoredByDeepProfilerAttribute prevents Unity Profiler from capturing method calls.
Read time 3 minutesLast updated 2 months ago

Definition

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method, AllowMultiple = false)]public sealed class IgnoredByDeepProfilerAttribute : Attribute

Remarks

When you capture data with Unity Profiler in Deep Profiler mode, Unity registers entrance and exit to each function. In some cases, you want some code to be ignored. This can happen for instance if it is some kind of wrapper or method or class that adds too much clutter to the Profiler Time Line view. You can apply the [IgnoredByDeepProfiler] attribute to classes, structures, and methods. [IgnoredByDeepProfiler] works for both the Mono and IL2CPP scripting backends.

Examples

using UnityEngine;using Unity.Profiling;[IgnoredByDeepProfiler]public class NewBehaviourScript : MonoBehaviour{ void Start() { }}

Inheritance

Inherited Members