Editor Tab
Introduction
The Editor tab provides a real-time display of your selected element. Editing can be performed in the editor tab by grabbing and moving objects, size handles, and the rotation handle. The editor tab can be used to visually select objects by clicking on them.

Canvas Size
The Editor tab displays the canvas size with a dotted rectangle. The canvas is used for positioning and sizing instances which are placed directly in a screen (with no direct parent).
The canvas can be adjusted by selecting from the dropdown in the Editor tab.

Project Default
The Project Default guides uses the value as set on the Canvas page of the Settings window. For more information see the Project Settings page.
Customizing Canvas Size Dropdown
You can customize available canvas sizes by editing the project file (.gumj or .gumx). At the time of this writing the customization must be done by hand.
To do this:
Locate the .gumj or .gumx file for your project
Open the project file in a text editor
Search for the
CustomCanvasSizestag
You can remove or add new sizes by making changes here. If the entire CustomCanvasSizes tag is deleted, Gum automatically re-creates the default set of tags the next time it loads the project file.
Font Scale
The Font Scale UI allows changing the global font scale of the project. This Font Scale value multiplies the font values for all Text instances in a project. This can be used to test your project at different global font scales.
This is a preview value and does not change your project. Similarly, this value is not automatically applied at runtime - it must be explicitly set in code.

Changing the global Font Scale value does the following to Gum elements:
Text objects have their Font Scale value multiplied by this value. Note that this does not generate new bitmap fonts
Objects which are sized according to the size of Text instances (such as the buttons in the screenshot above) are resized appropriately
Objects which use
Width Unitsof Absolute Multiplied by Font Scale orHeight Unitsof Absolute Multiplied by Font Scale are resized appropriately.
Preview
The Preview button, the icon-only play triangle at the far right of the Editor tab toolbar, opens your selected screen or component in a separate window running the real runtime. Buttons click, list boxes scroll, and text boxes take input, the same as they would in your shipped game, without wiring up your own game project first.
Preview needs a saved project and a selected screen or component. If either is missing, Gum reports why in the Output tab instead of opening a window.
While Preview is open, selecting a different screen or component in the tool swaps what Preview shows. Selecting a state in the States tab puts the previewed element in that state, so you can check each state of a component with the real runtime. Saving changes in the tool updates the Preview window automatically, the same way hot reload works for a game you run yourself.
A game you run yourself keeps showing a renamed or deleted screen until you restart it. Preview instead rebuilds what it shows from your saved project whenever a change cannot be applied live. It also rebuilds on every save while a state is selected in the States tab, so the state shows exactly as a restart would, and text typed into a text box, focus and scroll position reset. Preview follows a rename or a move of the element it shows. If that element is deleted, or nothing is selected, Preview shows nothing until you select another element or a save brings the element back.
Preview's window starts at your project's canvas size, and resizes again when you save a different canvas width or height. Resizing the window yourself is kept until the saved canvas size changes.
Preview renders with the same sibling order the tool's canvas uses. If Sort by batch is selected in the Performance tab, Preview sorts by batch too, so what you see matches the tool.
If your project has localization files, Preview shows the language selected in the tool in its window title, for example Gum Preview - MainMenu (Spanish), and translates its text into that language.
If your project has a component with the TooltipBehavior, Preview shows that component when you hover over a control that has a ToolTip, the same as a game loading the project does. See Tooltip.
Because Preview loads your project the same way a shipped game would, missing texture or font files show up as the same errors a player would see. If a font looks wrong, generate its FontCache in the tool first, the same way you would before running your own game. Texture changes need Preview restarted; only font changes are picked up live.
Last updated
Was this helpful?

