.scn Authoring Model

Back to Scene Docs

Scene files define node instances, parent links, script assignment, per-instance script_vars, and optional root_of composition. Each concrete node type keeps its own template/fields on node docs pages.

Core fields

parent: place instance under another scene node path.

script: bind behavior script file.

script_vars: inject per-instance data read/write through get_var! and set_var!.

root_of: compose from another .scn root, then override fields locally.

Scene example

[Player]parent = "World/Actors"script = "res://scripts/player.rs"root_of = "res://shared/player_base.scn"script_vars = {  speed = 9.5  move_mode = "aggressive"} [Node2D]  position = (16, 48)  rotation = 0.0[/Node2D][/Player] [EnemySpawn]parent = "World/Spawners"script = "res://scripts/spawn/enemy.rs"script_vars = { archetype = "grunt", count = 3 }[Node3D]  position = (0.0, 1.0, -8.0)[/Node3D][/EnemySpawn]

For scene overview and field intent, open Scene docs. For node-specific field defaults/templates, open Nodes docs and drill into each node type page.