The Code Editor
The Code Editor is where you write your game's Rust scripts, shaders and UI templates without leaving Renzora. It sits as a tab beside the Viewport in the Scene workspace, and fills the middle of the Scripting workspace.

To learn how scripts work, see Rust scripts.
Opening files
- Double-click a script or shader in the Assets panel.
- Right-click a file and choose Open in Code Editor.
- Drag a file from the Assets panel onto the Code Editor.
Each open file gets a tab along the top. A dot on a tab means it has unsaved changes. Press Ctrl+S to save.
Following the selection
When you select an object, the Code Editor shows that object's scripts and UI templates as its tabs, so the code you are working on always matches the object you picked. Tabs with unsaved changes stay open when you switch.
The toolbar
| Button | What it does |
|---|---|
| - / + | Make the text smaller or bigger (Ctrl+- and Ctrl+=; Ctrl+0 resets) |
| Whitespace | Show spaces and tabs as faint marks |
| Word Wrap | Wrap long lines to the panel's width instead of scrolling sideways |
| Compile | Shown for shader files: save and rebuild the shader straight away |
Writing code
The editor helps as you type:
- Colours for Rust, shaders (
.wgsl,.wesl,.glsl),.toml,.json,.html,.sql, shell scripts and Renzora scenes (.bsn). - Brackets and quotes close themselves when you type the opening one.
- New lines keep their indent.
- Folding: click the arrow beside a block's first line to hide it.
- Typing in other languages through your system's input method works, including Chinese, Japanese and Korean.
| To | Press |
|---|---|
| Comment or uncomment lines | Ctrl+/ |
| Delete the line | Ctrl+Shift+K |
| Move the line up or down | Alt+Up / Alt+Down |
| Duplicate the line | Alt+Shift+Up / Alt+Shift+Down |
| Undo / redo | Ctrl+Z / Ctrl+Y (or Ctrl+Shift+Z) |
The full list is on the Shortcuts page.
Saving
Saving a Rust script rebuilds it in the background, so you can keep working. If you press Play while a script is still building, Play waits for it, and the status bar shows Compiling with the file's name.
Problems
The Problems panel lists errors in your scripts. Click a row to jump to the file and line. In the Scripting workspace it sits under the Hierarchy, beside the Console.
Code Editor settings
Under Settings > Scripting, in the Code Editor section:
| Setting | What it does |
|---|---|
| Auto-close pairs | Close brackets and quotes as you type the opening one |
| Trim on save | Remove spaces at the ends of lines when you save |
| Whitespace markers | Show spaces and tabs |
| Word Wrap | Wrap long lines |
The fonts are set under Settings > Appearance > Interface (Code Font), and the code colours are part of the theme (Syntax Tokens, see Settings).