Lua module properties?

In regular scripts, we are able to specify properties:

go.property("myProperty",  "myValue")

and then we are able to change these properties from outside the script, either in a create function:

local props = { myProperty=myValue }
factory.create(myFactory, myPos, null, props)

or through the UI:

image

But lua modules aren’t called through a create function, nor do they have a UI presence in any object in the project. They do accept the go.property initializer form, though; is there any way to actually initialize these with anything other than the default values, other than writing a function in the module to initialize them (which kind of defeats their point)?

1 Like

Lua modules are completely disconnected from the game engine lifecycle functions and any code in the modules are run either when the module is required or when you explicitly call functions in the module from your script components. There is no functionality in Defold where you can define script properties (using go.property) in a Lua module and actually use the values in the engine.