Was ist das TSCN-Dateiformat?
Eine .tscn-Datei ist eine Textszene, die von der Godot Engine erstellt wurde, der kostenlosen Open-Source-Engine für die Erstellung von 2D- und 3D-Spielen. TSCN steht für „Text Scene“ (Textszene), und jede Datei beschreibt einen einzelnen Szenenbaum: die Knoten, aus denen ein Level, ein Charakter, ein UI-Bildschirm oder eine wiederverwendbare Komponente besteht, zusammen mit ihren Eigenschaften und Verbindungen.
Das Format ist im INI-Stil gehalten und lesbar. Eine Datei beginnt mit einer Deskriptorzeile wie [gd_scene format=3 uid="uid://cecaux1sm7mo0"], gefolgt von [ext_resource]-Einträgen, die auf externe Assets verweisen, [sub_resource]-Einträgen, die Daten wie Materialien und Kollisionsformen einbetten, [node]-Einträgen, die den Baum aufbauen, und [connection]-Einträgen, die Signale verdrahten. Godot 3.x speichert format=2; Godot 4.x speichert format=3 und fügt stringbasierte UIDs hinzu, damit eine Szene auch nach dem Verschieben verfolgt werden kann. Da das Format reiner Text ist, lässt es sich in Git sauber vergleichen (diff) und zusammenführen (merge), was ein Grund ist, warum Teams es der binären .scn-Variante vorziehen.
Sicherheit
RISIKO: LOWA .tscn is plain UTF-8 text, so it cannot execute on its own. Scenes can reference GDScript (.gd) files that do run inside Godot, so treat scenes from untrusted projects with the same caution as any downloaded source code. Opening a .tscn in a text editor is harmless.
Formatdetails
kurz gefasstProgramme zum Öffnen von TSCN-Dateien
Technische Details
technische Spezifikation| Encoding | UTF-8 plain text |
| Byte order | Not applicable (text format) |
| Container | INI-style sections with bracketed headings and key = value property lines |
| Compression | None; the text file is uncompressed. Godot compiles it to a binary form on import for faster loading. |
| Encryption | None by default |
| Typical size | A few hundred bytes to several hundred KB depending on node count and embedded sub-resources |
| Structure | Five ordered parts: a single [gd_scene] descriptor line, [ext_resource] entries pointing to external files, [sub_resource] entries holding embedded data, [node] entries describing the scene tree, and [connection] entries for signal wiring. An optional [editable] section marks instanced sub-scenes as editable. |
| Integrity | None built in |
| Platforms | Windows, macOS, Linux, Android, Web |
| Notes | The descriptor carries format=2 for Godot 3.x and format=3 for Godot 4.x. Godot 4 replaced incremental integer resource IDs with string-based uid values (uid://...). References inside the file use ExtResource("id") and SubResource("id"). Single-line comments start with a semicolon and are stripped when the editor re-saves the file. The .escn export variant uses the identical format but signals that the file came from another program and should not be hand-edited in Godot. |
| Human Readable | Yes, this is a design goal of the format for version control diffing and merging |
| Veröffentlicht | 2016 (Godot 2.x era; format=2 in Godot 3.x, format=3 in Godot 4.x) |
| Neueste Version | format=3 (Godot 4.x) |
| Spezifikation | docs.godotengine.org |
TSCN-Konvertierungen
Community Q&A
von Nutzern gefragtNoch keine Fragen - stellen Sie die erste Frage zu TSCN-Dateien.
Häufig gestellte Fragen
Wie öffne ich eine .tscn-Datei?
Kann ich eine .tscn-Datei von Hand bearbeiten?
Was ist der Unterschied zwischen .tscn und .scn?
.tscn ist Text und lässt sich gut in der Versionskontrolle vergleichen, während .scn die kompilierte binäre Form ist, die schneller lädt und kleiner ist. Godot erzeugt beim Import eine binäre Version.Warum beginnt meine .tscn mit [gd_scene format=3]?
format=3 bedeutet, dass sie mit Godot 4.x gespeichert wurde; format=2 steht für Godot 3.x.