Viewing Files¶
The editor opens project files in tabs of its own, so you can check a recording, an image or a script without leaving Lucky Engine. Images open in the Image Viewer, videos in the Video Player, Parquet datasets in the Parquet Table, and text files such as scripts and configuration in the Text Editor.
Each file opens in its own tab, named after the file, in the Main zone of the editor.
In short
Click a file in the File Tree or in the Observer's Data Sessions list, or
double-click an image or script in the Content Browser. .png and other images open in
the Image Viewer, .mp4 and .mkv videos in the Video Player, .parquet files in the
Parquet Table, and other text files in the Text Editor. Tabs with unsaved changes show
a dot, and the editor asks before they are closed.
Opening files¶
| From | How | Notes |
|---|---|---|
| File Tree | Click a file | Shows the whole project folder, including recordings and other files outside Assets. Open it from View → File Tree, the File Tree button in the title bar, or the Files layout. |
| Observer → Data Sessions | Click a file | Lists the .parquet, .mp4 and .mkv files of each recording session. See Recording. |
| Content Browser | Double-click a texture (.png, .jpg, .jpeg), a script (.cs) or a motion clip (.json) |
Other asset types open in their own editors; see Assets. |
| Content Browser | Right-click → Open in Text Editor | Opens any file as text, whatever its type. |
The type of the file decides which tab opens:
| File | Opens in |
|---|---|
.png .jpg .jpeg .bmp .tga .dds |
Image Viewer |
.mp4 .mkv |
Video Player |
.parquet |
Parquet Table |
| An asset with an editor of its own, such as a procedural graph, a prefab or a MuJoCo model | That editor |
Any other text file, such as .cs, .json or .yaml |
Text Editor |
A few files behave differently in the File Tree. Clicking a scene (.hscene) asks whether
to open it, with Open and Cancel buttons, and clicking a material (.hmaterial)
opens it in the Material Editor. Binary files with no viewer, such as audio, most 3D models
and fonts, ONNX models and .hdr environment maps, do not open.
Opening recordings and Parquet files
Recordings are saved in a DataSessions folder outside Assets: in the project
folder, or in the Recorder's Output Directory if one is set. They do not appear in
the Content Browser. Open them from the Observer's Data Sessions list, or from the
File Tree when they are in the project folder. Double-clicking a .parquet asset in
the Content Browser does nothing: open it from the File Tree as well.
Working with file tabs¶
Opening a file that is already open brings its tab to the front instead of opening a second copy. File tabs can be docked in the Main zone or moved to a separate window: drag the tab out of the editor window, or right-click it and choose Move to new window. See Layouts and Docking.
Close a tab with its close button, or by middle-clicking it. If the file has unsaved changes, the editor asks first; see Unsaved changes.
Image Viewer¶
The Image Viewer shows .png, .jpg, .jpeg, .bmp, .tga and .dds images. The
image opens fitted to the tab, and it stays fitted when you resize the tab until you zoom.
- Scroll the mouse wheel to zoom smoothly in or out around the cursor.
- Drag with any mouse button to pan. Panning works while the image is larger than the tab.
- Use the box in the bottom-right corner to set the zoom:
- The zoom slider shows the zoom as a percentage of the image's actual size, or
Fit while the image is fitted. You can also type a value, such as
200,200%or2x. See Editing Values for how number fields work. - 100% shows the image at its actual size.
- Fit fits the whole image in the tab again.
- The zoom slider shows the zoom as a percentage of the image's actual size, or
Fit while the image is fitted. You can also type a value, such as
You can zoom out to half the fitted size (or to the actual size, if that is smaller), and in to 16 times the larger of the actual or fitted size, which is enough to inspect individual pixels.
Video Player¶
The Video Player plays .mp4 and .mkv files, such as the camera videos in a recording.
The bar along the bottom of the tab has these controls:
| Control | What it does |
|---|---|
| Play / Pause | Starts or pauses playback. Clicking the video does the same. |
| Rewind | Goes back to the start and pauses. |
| Previous frame / Next frame | Steps one frame back or forward. |
| Timeline | Click or drag to jump to a point in the video. The time beside it reads position / length, in minutes and seconds. |
| Loop | Plays the video again from the start when it ends. |
Playback pauses when you switch to another tab and stays paused when you come back.
FFmpeg for playback¶
The Video Player needs the FFmpeg and FFprobe programs, which the editor can download for you. If it cannot find them, the tab shows FFmpeg is required for video playback with a Download FFmpeg button:
- Click Download FFmpeg. The tab shows Downloading FFmpeg... while it works.
- When the download finishes, the video opens by itself.
- If the download fails, the tab shows FFmpeg download failed. Install it and add it to
your PATH. Click Retry Download, or install FFmpeg yourself and make sure the
ffmpegandffprobeprograms are on your systemPATH.
You can also check and install FFmpeg from Tools → FFmpeg Settings. Recording doesn't always need it: camera video in the In-Process GPU formats, the default for new scenes, is encoded on the GPU without FFmpeg where the GPU supports it. The other video formats, and recording masks, depth or lidar video, need FFmpeg. See Video Encoding and FFmpeg.
A file that cannot be read shows Failed to open video.
Parquet Table¶
The Parquet Table shows the rows of a .parquet file, such as the data files of a
recording. Large files load in the background, and the tab shows
Loading parquet file... until the first rows are ready.
The header shows the file name, a Show in Folder button that opens the containing
folder in your file manager, and a summary such as Rows 1-200 of 5400 | 12 columns. When
the table is sorted, the summary also names the sort column and direction.
Paging¶
| Control | What it does |
|---|---|
| Arrow buttons | Previous and next page |
| Page x / y | The current page and the number of pages |
| Rows per page: | 50, 200 (the default), 500, 2000, 5000, 20000 or All |
With the table focused, Page Up and Page Down step one page, and Home and End jump to the first and last page.
Sorting¶
Click a column header to sort by that column, and click it again to reverse the order. Sort: sets what is sorted:
- All (the default) sorts every row in the file, which loads the whole file first.
- Page sorts only the rows on the current page.
Column widths can be changed by dragging the borders between headers.
Very large files
For a file with more than 500,000 rows, the All choices in Rows per page: and Sort: are shown in a warning colour, because loading every row may use a lot of memory. Hover over them for details. Keep to a paged view and Page sorting for such files.
What the columns of a recording contain is described in Dataset Format.
Text Editor¶
The Text Editor opens text files, such as C# scripts, JSON, YAML and XML, one tab per file. It colours the syntax of C#, JSON, Python and other common languages, and has a toolbar along the top:
| Control | What it does |
|---|---|
| Wrap: ON / Wrap: OFF | Wraps long lines to the width of the tab |
| Whitespace: ON / Whitespace: OFF | Shows spaces and tabs |
| Minimap: ON / Minimap: OFF | Shows a narrow overview of the whole file on the right |
| Tab: N | Tab width, from 1 to 8. Drag sideways on it to change it. |
| Font list | The editor font |
| Ln x, Col y | The cursor position |
The editor remembers these choices for every file you open.
| Shortcut | Action |
|---|---|
| Ctrl+F | Find. Type in Find:; Prev and Next step through matches, as do F3 and Shift+F3. |
| Ctrl+H | Find and replace. Type in Replace:, then click Replace or Replace All. |
| Ctrl+G | Go to a line number, typed in Go to: |
| Esc | Close the find or go-to bar |
| Ctrl+Shift+L | Select every occurrence of the selected text, with one cursor per match |
| Alt+Shift+Right / Alt+Shift+Left | Expand or shrink the selection to the surrounding brackets |
| Ctrl+S | Save the file |
When you have more than one cursor, the toolbar shows how many; click that count to go back to a single cursor.
Right-click a word for Go to Definition and Find All References. In C# scripts, these search the whole project, so you can jump from a script to a class defined in another file.
Saving a C# script (.cs) in the Text Editor also builds the project's scripts. Building,
external IDEs and hot reload are covered in
Creating and Building Scripts.
Unsaved changes¶
The editor tracks unsaved changes in:
- the current scene,
- Text Editor tabs,
- graph editor tabs, where you edit a procedural graph.
A Text Editor or graph editor tab with unsaved changes shows a dot on the tab.
Before anything would close these changes, the editor asks what to do with them. This happens when you close such a tab, open another scene, open or create another project, or quit the editor. The dialog is titled Save changes to name, or Save changes to N items with the list of files when there is more than one, and reads Your changes will be lost if you don't save them.
| Button | Result |
|---|---|
| Save (Save All for several items) | Saves everything listed, then carries on. For a scene that has never been saved, the editor first asks where to save it. If you cancel that, or a save fails, the dialog stays open so that you can choose again. |
| Don't Save | Discards the changes and carries on. |
| Cancel | Keeps everything open and stops the action. Esc, or a click outside the dialog, does the same. |
If Auto-save active scene is turned on for the project (it is on by default; see Settings) and the scene has been saved before, the editor does not ask about the scene. It saves the scene's changes to an auto-save copy instead, and loads that copy the next time you open the scene. File → Revert to Saved discards the auto-save copy and goes back to the last scene you saved yourself.
Where to go next¶
- Assets covers the Content Browser and what double-clicking each asset type opens.
- Recording explains how recordings are made and browsed in the Observer.
- Dataset Format describes the files and columns a recording writes.
- Creating and Building Scripts covers editing and building C# scripts.