Skip to reading
GDScript Programming & Godot

Godot resources in an exported PCA project

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Earlier edition reference / Current 0.86.4.0 property paths > p. 350

PCA’s authored native records are stored in the game data and prepared at runtime. They are not automatically written to individual .gd files with matching record IDs. CallScript is the record router; ResourceLoader loads real resources.

1. Use Build Game → Export Editable Godot Project and choose a new destination. Open its project.godot in the matching Godot editor.

2. Add a custom folder for new .gd, .tscn, .tres and other resources. Let Godot import them.

3. Reference those real paths from your bridge code. For a custom helper Script use preload/load plus new; for a PackedScene use instantiate.

4. Run the full PCA game under Godot, then export using its presets with the required files and plugins included.

5. Keep those custom additions when exporting a fresh source project later; a fresh export is not an automatic merge.

Native extensions and addons can require platform-specific binaries. File/network/OS behavior can differ on desktop, mobile and web. Test the produced build, including the first launch from a clean folder, before treating editor success as distribution success.

Page 326 of 378Permalink
Go to page