Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MarkerFlags

Profiler marker usage flags.
Read time 1 minuteLast updated 11 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.
WarningSpecifies that marker highlights performance suboptimal behavior.