Hasty Briefsbeta

Bilingual

Defold editor scripting in 1.10.4: scene editing

10 months ago
  • #Editor Scripting
  • #Game Development
  • #Defold
  • Defold editor now supports editing scenes using editor scripts.
  • Editor scripts can automate tasks like importing asset packs and creating game objects.
  • A practical example involves using Kenney’s Castle Kit and Dragosha’s light-and-shadows pack.
  • Editor scripts can generate game objects with embedded model components automatically.
  • The process involves creating templates for game object files and using editor.create_resources().
  • Complex scenes can be composed by editing collections as trees, with the editor handling file formats.
  • Transactional editing API allows grouping multiple edits into a single undoable step.
  • The example script creates a scene with all imported models and labels for each.
  • Editor scripting capabilities are documented, with more features like tilemap editing available.