Skip to main content

Game Scripts

Game Scripts (left area) lists the BT scripts your game runs when you press Play: the files that contain your entry function, your UI entry script, the packages they include, and the engine library packages they use. Click a script to open it.

Open it with the Game Scripts button in Explorer, Scripts on the Project overview, or View > Game Scripts.

What it shows​

The list starts from these fields in your saved project file (see game.json):

FieldUse
bt.sourcesYour game's source files.
bt.entryThe entry function (default gameMain).
ui.entryYour UI entry script (default ui/game/main.bt).
bt.programA compiled program, listed but not openable.

From each script it adds the other .bt files in the same folder and the packages it includes, and so on. The header shows the script count and the entry ("On Play → entry()"), and notes a compiled program or native module if your project has one.

Each script has a role:

RoleMeaning
Game entry · name()The file that declares your entry function. Opens at that line.
Game codeAnother bt.sources file.
UI entry · uiMain()Your ui.entry script.
Package scriptAnother .bt file in the same folder as a listed script.
Included scriptA file in a package you include.
Engine libraryAn engine or dependency script. Opens read-only.
Compiled BT programYour bt.program. Not openable.
… · unavailableA file that could not be read.

Controls​

ControlAction
Open game manifestOpens your project file in Source Editor.
Refresh scriptsRebuilds the list. Use it after adding, moving or deleting script files.
FilterShows only scripts whose path or role contains the text.
Collapse AllCollapses every folder and clears the filter.
Click a folder / scriptExpand or collapse it / open it.

The list also updates when you save a document or when the project file changes on disk.

Limits​

  • Only the entry script opens at a specific line; others open at the top.
  • Paths outside the project folder (absolute or with ..) show as unavailable.