Collection and script
Open the Hengo tab in the bottom panel of the Godot editor. If it is not there, the plugin is not enabled, see Installation.
Find your way around
Section titled “Find your way around”Four areas, and you will use all of them: the narrow Scripts rail on the far left, the side panel next to it with its three tabs, the canvas in the middle where you build, and the top bar above it.
The full tour is in The Interface.
Create the collection
Section titled “Create the collection”On the Dashboard tab, click New Collection, type My Collection, and hit Create. The row
that appears is the collection: clicking it opens it.
A collection is a group of scripts that open and compile together, so scripts that talk to each other stay side by side: a player, its weapon and its bullet in one, a menu in another. Everything in a single collection also works.
Create the script
Section titled “Create the script”Scripts are created from the Scripts rail, not from the Dashboard. Expand the rail and click the + next to the title.
- Script name:
my sprite - Extend from:
Sprite2D - Then Create and Open
Two things about that dialog:
- No underscores or casing needed. Type
my sprite, Hengo writesmy_sprite.gd. - The class you extend filters what you are offered. A
Sprite2Dscript is never offered 3D physics actions, and the built-in values a field can read are filtered the same way. Pick the class of the node the script will actually sit on.
Where things are
Section titled “Where things are”Two folders appear in your project, and they are not the same kind of thing:
| Folder | What it is |
|---|---|
res://hengo/collections/ | The source: your graph, the thing you edit |
res://hengo/scripts/ | The build: plain .gd files, the thing Godot runs |
You attach the file from scripts/ to a node, and never edit it by hand: the next compile overwrites
it. Source and Build has the details.