Guide
Editor tools
Everything the engine adds to the Unity editor is in one menu, Tools → DevCore. Creating things is also in the right-click menus of the Project and Hierarchy windows.
The menu
| Tools → DevCore | What it does |
|---|---|
| Live Preview, New Live Preview | Shows a page or a component while you edit it |
| Inspector | The element tree, styles, layout and performance of a view |
| Locales | The locale editor |
| Create App | Writes the files of a new app |
| Add App (2D) to Scene, Add 3D View to Scene | Adds a DevCoreApp or a DevCore3DView |
| Download Used Icons | Saves the Iconify icons your components name |
| Live Session | Turns hot reload on and off |
| Recompile All Components | Compiles every .dcue file again |
Live Preview
The preview window shows a page or a component outside Play mode. Open it from the menu, by right-clicking a .dcue file (Open in DevCore Live Preview), or with the preview button in VS Code.
- Device presets: Full HD, HD, laptop, 4K, handheld, TV, phone, tablet and custom sizes, with Rotate.
- Switches: dark mode, touch, language and direction.
- Pick: point at an element to see its box model, and grid and flex overlays.
- A panel on the left lists every
.dcuefile; a click previews it, a double click opens it in your editor. - The preview takes the mouse and the keyboard, so you can use the page in it.
Hot reload
While a Live Preview shows a file, saving it (or a component it uses) updates the preview without waiting for Unity to recompile:
| You change | What happens |
|---|---|
| A style sheet | It is reloaded in place |
| A page | The page is rebuilt |
| A component | It is compiled in memory and swapped in, keeping its [State]. A starting value you changed wins |
| A locale file | Its texts are merged in; removed keys are removed |
Errors appear as an overlay with a clickable file:line:column. Unity's own compile waits until you press Apply, close the last preview or leave Play mode. Hot reload works in Play mode too.
Inspector
Tools → DevCore → Inspector shows the element tree of a view, with a tab for each question:
| Tab | Shows |
|---|---|
| Styles | The rules that match, each with its file and line; overridden declarations crossed out |
| Computed | The computed value of every property |
| Box model | Content, padding, border and margin sizes |
| Component | The component's [State], editable live |
| Listeners | The event listeners on the element |
| Layers | Paint nodes, draw calls, why a batch breaks, atlas pages |
| Performance | The last frame's timings and a graph |
VS Code extension
The package includes the DevCore UI extension for .dcue files. Install it with
code --install-extension Packages/com.devcore.uiengine/Editor/VSCode/dcue-<version>.vsix
or Extensions → … → Install from VSIX. Its language server understands the C# of a component, in the script and in the template:
- Completion of the script's members, the project's types, the engine's attributes, component tags and their props, and icon names.
- Auto-import: choosing a component writes its
importline; a type of another namespace brings itsusingline. - Hover shows a member's documentation; F12 goes to its definition; signature help shows parameters.
- Problems while typing, from the C# compiler and the component compiler, with quick fixes.
- Highlighting of the markup, the script, the styles and the template syntax; snippets; Emmet; Format Document.
- Open in Live Preview opens the file in Unity's preview window.
- Generated
.dcue.csfiles open as a do-not-edit notice;*.dcue.localefiles are treated as YAML.
Code completion needs .NET 8 or newer on the machine, and the C# project files Unity writes. Install Unity's Visual Studio Editor package, then in Edit → Preferences → External Tools choose Visual Studio Code, tick Embedded packages and press Regenerate project files.
In Rider and Visual Studio, map *.dcue to the HTML editor.
In the Project window
.dcuefiles show the engine's icon on a blue tile, generated.dcue.csfiles on a purple one.- Selecting a
.dcuefile shows whether it is a component or a page, with Watch live and Edit. - Selecting a generated file shows a warning not to edit it.
- Compiler errors appear in the Console at the
.dcueline and column.
Licences in builds
After every player build, a Licenses folder beside the game holds the engine's licence, the notices of the third-party material it contains, and every .txt file you put in Assets/DevCoreUIEngine/Licenses (a font's OFL.txt, the icons' licence file). You do not have to remember to copy them.