0 votes

Is there a way to get (with code) the Product Version configured inside the Export settings?

asked Nov 13, 2018 in Engine by kleber (12 points)

2 Answers

0 votes

It looks like there is no script API to get this information, I thought it was saved in ProjectSettings regardless but it isn't.
I see it is saved in the export_presets.cfg.

If you want to access this from script you may ask for it in the issue tracker.

answered Nov 15, 2018 by Zylann (26,157 points)
+1 vote

You can edit the export_presets.cfg using the ConfigFile class.

https://docs.godotengine.org/en/3.0/classes/class_configfile.html#class-configfile-load

Here's an example:

var export_config = ConfigFile.new()
var export_config_path = "res://export_presets.cfg"
var config_error = export_config.load(export_config_path)
export_config.set_value("preset.0.options", "application/product_version", "dynamic product version")
export_config.save(export_config_path)
answered Feb 2, 2019 by madcapacity (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.