Skip to content

Profiler markers

Tick UI emits ProfilerMarker instances during a frame. Open Unity's Profiler, switch to the CPU Usage module, and filter on these names to attribute CPU cost.

Frame lifecycle

Marker Wraps
UI.BeginFrame The full BeginFrame body: scale-cache refresh, input update, hovered-panel resolution, seeded rect and clip pushes.
UI.EndFrame The full EndFrame body: panel-layer flush, seed pops, stack validation, drawer frame work.
UI.ValidateStacks The end-of-frame stack-balance assertion.
UI.CaptureCallstacks Diagnostic callstack capture for ID collisions, when active.

Layout helpers

Every layout helper has a marker named UI.<HelperName>. Examples:

Marker Wraps
UI.PushRect A rect-stack push.
UI.Top, UI.Bottom, UI.Left, UI.Right The edge helpers.
UI.Center, UI.CenterHorizontal, UI.CenterVertical Centring helpers.
UI.Pad, UI.PadHorizontal, UI.PadVertical, UI.PadLeft, UI.PadRight, UI.PadTop, UI.PadBottom Padding variants.
UI.InsetTopLeft, UI.InsetTop, UI.InsetTopRight, UI.InsetLeft, UI.InsetRight, UI.InsetBottomLeft, UI.InsetBottom, UI.InsetBottomRight Inset variants.
UI.Pop, UI.Next Stack pop and schema advance.
UI.Auto The Auto() scope construction.
UI.LayoutToScreen, UI.ScreenToLayout Coordinate-space conversion.
UI.PushClipRect, UI.MergeClip Clip-stack manipulation.

Schema layouts

Only the Sized and Split schemas carry markers. The Series, Stack, Grid, and Radial schemas are not individually instrumented.

Marker Wraps
UI.PushSized, UI.PushSizedElement Sized layout push and element advance.
UI.PushSplit, UI.PushSplitHorizontal, UI.PushSplitVertical, UI.PushSplitHorizontalReverse, UI.PushSplitVerticalReverse, UI.PushSplitElement Split layout pushes and element advance.
UI.NextInSplit, UI.PopSplit Split element advance and pop.

Drawer

Marker Wraps
Drawer.DrawRectangle, Drawer.DrawPolygon, Drawer.DrawTexture, Drawer.DrawTexture9Slice, Drawer.DrawText, Drawer.MeasureText, Drawer.DrawShadow, Draw Frosted Per-shape command recording.
Drawer.Frame Drawer.Frame(), including the per-frame text-mesh cache prune.
Drawer.HandleCommands The full command-list playback in RecordInto.
Drawer.HandleDrawRectangle, Drawer.HandleDrawPolygon, Drawer.HandleDrawText, Drawer.HandleDrawTexture, Drawer.HandleDrawTextureByName, Drawer.HandleDrawTexture9Slice, Drawer.HandleDrawShadow, Handle Draw Frosted, Handle Draw Line Per-shape command playback.
Drawer.BuildBatchCommands, Drawer.RecordBatchCommands, Drawer.FlushCurrentBatchToBatchCommands, Drawer.EmitPassthrough Instancing-batch construction and recording.
Drawer.AddCommand, Get Or Create Command, Drawer.GetOrCreateBatchCommand Command-pool allocation per draw.
Prune Cached Text Text-mesh cache eviction.
Draw Segment, Draw Line Pixel, Draw Lines Pixel Line and segment recording.

Additional resources