Is there a way to receive and read command line arguments in a Defold app?
You can add extra config values, like so:
./dmengine --config=test.some_int=1 --config=test.some_string=hello
And then use them as usual:
local some_int = sys.get_config_int("test.some_int", 0)
local some_string = sys.get_config_string("test.some_string", "")
(a bit untested, but should work)
1 Like
One more option is defos.get_arguments()
1 Like
Fantastic! Thank you both