Skip to content

Console reference

The ArcRml.* console commands and variables a project uses to open, preview and test its documents. Type them as Open the console describes. <Path> is a document's package path, such as /ArcRmlUISamples/UI/Rml/FirstScreen/FirstScreen.rml. Commands that act on documents work on the first local player of the world they run in. The last column says where each exists: Every build, Not Shipping (every build except a Shipping build) or Editor (editor builds). Of the commands in the tables below, only ArcRml.Validate, ArcRml.DumpExpanded and ArcRml.LayoutDump need the editor.

Open and preview

Command What it does Exists in
ArcRml.Open <Path> Opens the document on its layer. Every build
ArcRml.Close <Path> Closes the document. Every build
ArcRml.Preview <Path> [Variant] Opens the document with its preview data, or a variant of it; reopens it when it is open. A Shipping build shows no preview data. See Editor preview. Every build
ArcRml.PreviewSet <Path> [Variant] Switches the preview variant of an open document without reopening it; without a variant it shows the base data. Not Shipping
ArcRml.PreviewHidden 0\|1 Variable, default 0. At 1 preview view models bind with ArcResolved false (the field every view model has, true once the model exists: Fields every model gets), as in a Shipping build; it applies to documents opened afterwards. See Editor preview. Not Shipping
ArcRml.Discard <Path> Destroys the parked view of a closed keep-alive document, so its next open loads it again; a path that is not parked only logs. Every build
ArcRml.MaxFrameRate <Hz> Variable, default 120. Upper bound on how often a view that is animating is rendered again. Every build
ArcRml.CompositedLayers 0\|1 Variable, default 1. At 1 an element with a transform or opacity animation or transition (running, or finished and holding its value) or will-change paints its content once into a texture and each later frame draws that texture with the element's transform and opacity. At 0 such elements paint as any other element; existing layers are released on the next frame. Every build
ArcRml.LayerBudgetMB <MB> Variable, default 128. Memory for the layer textures of one view. A layer that would go over it is drawn at a lower resolution, or not made and painted as any other element; a lowered budget releases layers on the next frame until the rest fits. Every build

For example, with the game running, ArcRml.Open /ArcRmlUISamples/UI/Rml/FirstScreen/FirstScreen.rml shows the FirstScreen sample, a panel with the title "Hello from ArcRmlUI" and one line of text, and ArcRml.Close with the same path removes it (Quick start). The text shows only when /ArcRmlUISamples/UI/Rml/Fonts/Fonts.rcss is in Font Sheets (Settings).

Validate and write out

Command What it does Exists in
ArcRml.Validate <Path> [<Path> ...] Validates .rml and .rcss files, given as disk paths (files or folders) relative to the project folder, like the Content Browser entry Validate RML: ArcRml.Validate Content/UI/Rml/Menu.rml checks /Game/UI/Rml/Menu.rml. The result goes to the Validate page of the ArcRmlUI Message Log. See Validation. Editor
ArcRml.DumpExpanded <Path> Writes the document after its components are expanded to Saved/ArcRml/<Path>. Editor
ArcRml.LayoutDump <Path> [OutDir] After the next UI update of an open document, writes its layout (<Name>.layout.json) and its element tree as it is at that moment, as HTML (<Name>.html) to OutDir, default Saved/ArcRml/LayoutDump; a relative OutDir is inside that folder. Editor

Inspect and simulate input

Command What it does Exists in
ArcRml.Inspect [Path] Toggles the inspector for an open document: an overlay in the view on which you click an element to select it, and a panel at the right of the game viewport, with the mouse cursor shown. Without a path it closes the inspector. Not Shipping
ArcRml.InspectDump <Path> [X Y] After the next update, logs the inspector snapshot of the selected element: tree path, source line, box model, styles by rule. With X Y (view pixels) it selects the element there first. Not Shipping
ArcRml.InspectEdit <Path> <selector> <property> <value> Applies an inspector inline edit to the first element that matches the selector; it is applied again after the document is rebuilt until the inspector resets. Not Shipping
ArcRml.Click <Path> <Selector> [Index] Sends a left click to the centre of the Index-th visible element (default 0) that matches Selector; an element scrolled out of view is scrolled into view first. Not Shipping
ArcRml.UIAction <ActionName> Posts a UI action, named like its Input Action asset, to the topmost open document whose input mode is menu or all, as if one of its keys fired it. Not Shipping
ArcRml.SimulateKey <KeyName> [Tap\|Pressed\|Released] [AnalogValue] [@X,Y\|@X:Y] [repeat N] [hold Seconds] On the next frame sends the key through the platform message handler, as a device does. Tap (default) sends the press and, on a later frame, the release; Pressed and Released send one of them. repeat N sends N auto-repeat presses; hold Seconds holds a gamepad axis for that long; @X,Y or @X:Y puts a mouse key's cursor at those pixels from the viewport's top-left corner for this command; -ExecCmds splits on commas, so use @X:Y there. Not Shipping
ArcRml.Clock <Seconds>\|live Stops time for the UI at that many seconds: animations, transitions, double-click detection, smooth scrolling, the text cursor blink and slider and scroll repeat stop advancing. live returns to real time. Set it before the first ArcRml.Open: a value below a time already used plays animations backwards. Not Shipping
ArcRml.ClockAdvance <Seconds> Moves the stopped time forward by that many seconds, to step animations; use it after ArcRml.Clock <Seconds>. Not Shipping
ArcRml.VirtualPointer 0\|1 Shows or hides the CommonUI virtual pointer of the first local player, so a gamepad accept is also sent as a click at the pointer. Not Shipping

These commands are not described here: the performance, memory and verification commands (ArcRml.Perf*, ArcRml.MemoryReport, ArcRml.*Verify), which measure the plugin itself (the ArcRml.*Verify commands exist in editor builds only, the others in every build except Shipping), ArcRml.PointerPin, which holds the mouse pointer still for measurement runs, and ArcRml.Reparent and ArcRml.Wrap, which edit the element tree of open documents (editor builds only).