Can I use Java in my script?

If I can are there any special rules to use it?

Defold game logic is written in Lua. And you can extend the engine with new functionality written in C/C++. We also have platform specific support for Java on Android, Obj C on iOS and OSX and Javascript on HTML5.

3 Likes

How do I use the one for android and can I see an example

Read more about native extensions here: https://www.defold.com/manuals/extensions/

You can either use html5.run() directly from Lua or, as @britzl mentioned, you can use an extension. See this example.

Can I change stuff in project settings through scripts

You can read from game.project using sys.get_config() and you can create a Lua module on top of that to read defaults from game.project and then override/change those via the Lua module.