Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | kleber |
Is there a way to get (with code) the Product Version
configured inside the Export settings?
Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | kleber |
Is there a way to get (with code) the Product Version
configured inside the Export settings?
Reply From: | Zylann |
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.
Reply From: | madcapacity |
You can edit the export_presets.cfg
using the ConfigFile
class.
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)
By default this file, export_presets.cfg, is not available on the exported version, you have to include then manualy on the resources tab of the export config
dpensky | 2021-03-25 17:31