Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MarkerFlags

Profiler marker usage flags.
Read time 1 minuteLast updated 6 days ago

Definition

[Flags]public enum MarkerFlags : ushort

Remarks

Use to specify marker usage or availability information.

Examples

using System.Collections.Generic;using Unity.Profiling.LowLevel;using Unity.Profiling.LowLevel.Unsafe;public class Example{ public static unsafe void WriteAllNonDevelopmentStatsToFile(string filePath) { using (var writer = new System.IO.StreamWriter(filePath)) { var availableStatHandles = new List<ProfilerRecorderHandle>(); ProfilerRecorderHandle.GetAvailable(availableStatHandles); foreach (var h in availableStatHandles) { var statDesc = ProfilerRecorderHandle.GetDescription(h); if (!statDesc.Flags.HasFlag(MarkerFlags.AvailabilityNonDevelopment)) continue; var name = System.Text.Encoding.UTF8.GetString(statDesc.NameUtf8, statDesc.NameUtf8Len); writer.WriteLine($"{name};{statDesc.Flags}"); } } }}

Fields

Value

Description

AvailabilityEditorSpecifies that marker is present only in the Editor.
AvailabilityNonDevelopmentSpecifies that marker is present in non-development Players.
CounterMarker represents a counter.
DefaultDefault value for markers created in native code.
SampleGPUSpecifies that marker is capable of capturing GPU timings.
ScriptMarker is created by scripting code.
ScriptDeepProfilerSpecifies that marker is generated by deep profiling.
ScriptInvokeSpecifies that marker is generated by invocation of scripting method from native code.
VerbosityAdvancedMarker is intended for advanced profiling activities
VerbosityDebugUsed internally by Unity.
VerbosityExternalFor external profiler integrations that do not capture all markers by default (such as for the Superluminal profiler) setting this flag will make the Sampler visible to them.
VerbosityInternalUsed internally by Unity. Profiler markers with this flag set are not displayed in the Unity Profiler.
WarningSpecifies that marker highlights performance suboptimal behavior.