Defold 1.2.157 has been released


Defold 1.2.157

Improved Gamepad Support

In this release we’ve added gamepad support for HTML5, along with bindings for some common controllers in the default.gamepads file.

We have also added the possibility to get notified when a gamepad is connected or disconnected at runtime. There are two new gamepad triggers available to be bound in your input binding file, gamepad-connected and gamepad-disconnected, which can be listened for in the on_input callback.

On macOS and Windows we have added support for gamepad “hats” (also called dpad input in some circumstances). This fixes an old issue where the input from the dpad on a PS4 controller connected to macOS previously wasn’t able to be bound.

Android resources

We’ve improved a bit on how the Android resources are found from extensions.
Previously, the recommended way was to put it directly under the <extension>/res/android/res folder.
However, to more easily support multiple packages we check the folder for other folders, to see if they in turn are android assets.
You cannot mix the two ways in the same extension. See example

Bundle resources

The bundle resources are now (finally) a comma separated list of folders.

To make the reasoning clear about what resources are Android resources and which are bundle resources, any resources put in the <extension>/res/<platform>/res folder
are not considered for bundling.


  • DEF-3931 - Added: Added gamepad support for HTML5
  • DEF-3349 - Added: Added support for gamepad connect/disconnect at runtime
  • DEF-3708 - Added: Add support for gamepad “hat” inputs
  • DEF-3949 - Fixed: Memory leak in gui.animate callback
  • DEF-3813 - Fixed: Better error messages when bundling if icons are missing
  • #4186 - Added: game.project now has two more options android.minSdkVersion and android.targetSdkVersion
  • #4209 - Fixed: Crash in ares_addrinfo_callback
  • #4182 - Fixed: The Android dmengine.apk app is not orientation locked
  • #4172 - Fixed: The sys.load_resource()now returns tuple (resource, error_message)


  • #4103 - Added: Modernized look of a few more dialog boxes.
  • #4105 - Fixed: Text boxes now show the actual, scaled size of the node instead of the bounds of the text.
  • #4122 - Fixed: Malformed .script_api files in dependencies no longer cause build errors.
  • #4132 - Fixed: File not found build error after removing dependency from project.
  • #4164 - Fixed: Bad error message if a connection error occurs during project import.
  • #4184 - Fixed: Exception when creating a new file after opening a project whose folder casing changed.

GUI animate callback question (Issue-3124) (DEF-3949) (SOLVED)
Gamepad in html5 (DEF-3931) (SOLVED)
Gamepad Detection (DEF-3349) (SOLVED)
pinned globally #2

Dmengine runs on Android only in portrait mode (Issue-4182) (SOLVED)
Sys.load_resource warning spam (DEF-1116) (#4172) (SOLVED)

I kinda want to make a game that’s controlled by plugging and unplugging a gamepad now.



Which version of Facebook NE works with this engine version?



Oops, accidentally clicked the wrong reply button…

Since the update to the new editor version 1.2.157 my bundle resources defined in the game.project are ignored. So my adaptive icon for Android ( is no longer included in the APK.
Can you tell me what the new path must look like for it to work again?




1 Like


@johann.ulbrich I’m sorry to hear that this is no longer working for you. It really still should work the same way. What’s the path you have set for bundle resources?

1 Like


The v1.3 version of the extension is the official one currently. We’re still working on the v2.0 version.



@johann.ulbrich Sorry to hear you got trioubles with bundling now.
Here’s a setup from a project we have, which I tested with and the apk seems to be as expected.

In the game.project file:

bundle_resources = /assets/bundle

In the project:


And when printing the contents (unzip -l game.apk):

     8940  06-25-2019 08:45   AndroidManifest.xml
      552  06-25-2019 08:45   res/drawable-anydpi-v26/icon.xml
     8497  06-25-2019 08:45   res/mipmap-hdpi-v4/ic_launcher_bg.png
     1548  06-25-2019 08:45   res/mipmap-hdpi-v4/ic_launcher_fg.png
     4248  06-25-2019 08:45   res/mipmap-mdpi-v4/ic_launcher_bg.png
     1164  06-25-2019 08:45   res/mipmap-mdpi-v4/ic_launcher_fg.png
    13555  06-25-2019 08:45   res/mipmap-xhdpi-v4/ic_launcher_bg.png
     2775  06-25-2019 08:45   res/mipmap-xhdpi-v4/ic_launcher_fg.png
    26457  06-25-2019 08:45   res/mipmap-xxhdpi-v4/ic_launcher_bg.png
     5052  06-25-2019 08:45   res/mipmap-xxhdpi-v4/ic_launcher_fg.png
    41260  06-25-2019 08:45   res/mipmap-xxxhdpi-v4/ic_launcher_bg.png
     6848  06-25-2019 08:45   res/mipmap-xxxhdpi-v4/ic_launcher_fg.png

What does your setup look like?
What error do you get?
What does your apk listing look like?



My configuration looks exactly like yours. When I build it in editor 1.2.156, the folders are included. If I build it in the new editor, these folders are missing.

I build the same project each time. The only difference is the Facebook extension. I have to remove it in 1.2.156, otherwise I get an error when building. Unbenannt



Regarding the facebook extension, make sure you use v1.3, since the v2.0 isn’t ready yet.

For the bundling issue, perhaps you can make a minimal repro project to share with us to make it easier to debug?



Strange. Can you trim this down to a minimal example to share?



I can reproduce the behavior with your Adaptive Icon demo project:



Sounds related to Issue-4215 (#4215) (the difference between Windows and MacOS bundling pipeline in 1.2.157)

1 Like


Faced with same problem when bundle for HTML5 platform on 1.2.157 Win10 Editor
Looks like replacing “/folder” with “folder” (without leading slash) can solve it.



Just a quick update, I’m looking into the issues with bundle resources on Android.

If it’s a blocker for you, please use previously released editor (1.2.156) while we work on a fix:


Bundle android error (#4236)
Facebook extension crashes on Android

Any plans on adding runtime detection of gamepads and let users to map them?

1 Like


Yes, ideas, but nothing designed or concrete planned currently. Might give it a shot on an exploration day.

1 Like


Was in this version the searching in game.project introduced too? I think it appeared after the update recently :smiley: it’s a great feature! I won’t need to switch to atom or slide through the whole list again! :smiley: thanks!



An update regarding the issue with bundling Android from Windows (#4215):

We have a fix ready and will probably release a new stable in a few days that includes this fix and a few more bug fixes.


Facebook extension crashes on Android