Creating Native Extension with Clojure

Hi! Defold editor dev here. While we’ve made some extensions to the editor as part of our Spine, Rive and TexurePacker extensions, this way of extending the editor is not really officially supported at the moment. Often, making something work requires exposing functionality from the editor code to the plugins, and the API hasn’t been stabilized for public consumption. If you use it, you’re likely to see your extension break quite often as we make changes to the editor. You probably have a call stack in the editor logs with information about the exception, but I would advise you to not go down this route at present. For our own Clojure-based extensions, we have test suites that verify we don’t break stuff, but we simply cannot cover every extension the community makes.

Our “official” method for extending the editor is currently to use Editor Scripts, which are written in Lua. Unfortunately the exposed API is still very limited. Nevertheless, some users have had success with a combination of editor scripts and external executables or Python scripts and the like. We intend to grow the Editor Scripts API organically as new needs arise, but we’ve unfortunately not been able to dedicate the required resources to it for quite some time.

4 Likes