Open
Description
I am trying to manipulate the settings files for my CI pipeline. I can modify settings that already exist, but when I try to load a new setting attribute, it lets me add it to the entry, but when I run dum_yaml command, only settings attributes that already exist are changed. The new settings I have added are not in the file.
Specifically, I am manipulating the IL2CPP settings and trying to protect against a situation where someone has not enabled il2cpp and is missing the settings in the project settings file.
Steps to reproduce:
- project_settings_file = 'UnityProject/ProjectSettings/ProjectSettings.asset'
- doc = UnityDocument.load_yaml(project_settings_file)
- ProjectSettings = doc.entry
- ProjectSettings.testAttribute = {}
- ProjectSettings.testAttribute
- ProjectSettings.testAttribute["Test"] = "1"
- ProjectSettings.testAttribute["Test"]
- doc.dump_yaml()
- Open ProjectSettings file
Expected Results:
Project settings file has a new entry called testAttribute with a value of Test = 1
Metadata
Metadata
Assignees
Labels
No labels