Skip to main content

Documents

Every text file you open in Studio is a document. A file has only one document, however many editors show it: if you change a scene in Scene View, the same change appears in Source Editor, and both share one unsaved state, one Undo history and one Save.

Opening and closing​

ActionResult
Click a file in ExplorerOpens it in the matching editor (see which editor opens). If it is already open, Studio switches to it.
Click a document tabSwitches to it. Studio also checks whether the file changed on disk.
File > Close Editor (Ctrl+W), or a tab's close buttonCloses the document. If it has unsaved changes, Studio asks Save, Discard or Cancel.
File > Close All Editors (Ctrl+Shift+W)Closes all documents, asking Save All, Discard All or Cancel if any are unsaved.
File > Close Project, opening another project, or closing the windowAsks the same Save All / Discard All / Cancel question, including any unsaved painted map in the Material Editor.

Each document remembers its own cursor, selection and scroll position.

Some files open read-only: engine and dependency sources (tab marked · Engine) and files outside the project reached from the debugger or code navigation (tab marked · External). You can read, select, copy and search them, but not edit or save them.

Binary files (images other than PNG, audio, video, fonts, archives, compiled programs and libraries, and similar) do not open as text. PNGs open in the Image Viewer.

Saving​

CommandEffect
File > Save (Ctrl+S)Saves the current document.
File > Save All (Ctrl+Shift+S)Saves every unsaved document.

Before writing, Studio checks that the file on disk has not changed since it was loaded. If it has, the save stops and Studio asks what to do (see Files changed outside Studio).

Studio saves all documents automatically before Play and before every build. If any save fails, Play or the build does not start.

Files are UTF-8. Each file keeps the line endings it had (LF or CRLF); pasted text is converted to match.

Undo and Redo​

Edit > Undo (Ctrl+Z) and Edit > Redo (Ctrl+Y) act on the current document. Each document has its own history. One editor action, such as committing an Inspector field or dragging an object in a viewport, is one Undo step. Saving does not clear the history.

Files changed outside Studio​

Studio checks open files every few seconds, and whenever you switch to a tab.

On diskNo unsaved changes in StudioUnsaved changes in Studio
ChangedStudio reloads the file.Studio marks the document as conflicted and shows a warning in Output. You can keep editing.
Deleted or unreadableMarked conflicted, with a warning.Same.

When you switch to a conflicted document or save it, Studio shows File changed on disk:

ChoiceEffect
OverwriteSaves your version over the file on disk.
ReloadThrows away your changes and loads the file from disk.
CancelKeeps your changes unsaved.

The choice applies to all conflicted files at once. Autosave and plugins never overwrite a conflicted file; only this choice does.

File > Revert / Reload reloads the current document from disk, asking first if it has unsaved changes.

Autosave​

Autosave is off by default. Turn it on in File > Settings > Autosave: After 5 seconds, After 30 seconds or After 1 minute without an edit to that document. The setting applies to all projects and is stored in your user settings.

Autosave waits while a dialog is open, while you hold a mouse button, and during builds. If an autosave fails or finds a conflict, the document stays unsaved and Output shows a warning; Studio does not retry until you edit or save again. Read-only documents are never autosaved.

Recovery​

Separately from saving, Studio keeps a copy of your unsaved documents. If Studio closes unexpectedly, the next launch asks Recover unsaved work?:

ChoiceEffect
RestoreOpens the project and restores each unsaved document, with its cursor and scroll position. Nothing is written to disk until you save. Files that changed on disk in the meantime are marked conflicted.
DiscardDeletes the recovery data.
LaterKeeps the recovery data and asks again next launch.

Recovery covers up to 256 documents, 32 MiB each and 64 MiB in total. Painted texture maps in the Material Editor are not recovered; save them yourself. File > Settings shows where the recovery file is stored.

Settings page​

File > Settings opens Studio's preferences, which apply to every project:

ControlDescription
AutosaveOff (default), After 5 seconds, After 30 seconds, After 1 minute. Applies immediately.
Recovery statusWhere the recovery file is stored, or why recovery is unavailable.
Keyboard ShortcutsOpens the shortcut editor.

Extra language servers are set in the settings file, not on this page. If the settings file is damaged, Studio leaves it untouched, keeps autosave off and disables the control.

Limits​

  • Changes made outside Studio are noticed within a few seconds, not instantly.