Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dump_yaml does not dump new attributes you have added to a settings file #63

Open
NurullahMorshed opened this issue Oct 21, 2023 · 0 comments

Comments

@NurullahMorshed
Copy link

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:

  1. project_settings_file = 'UnityProject/ProjectSettings/ProjectSettings.asset'
  2. doc = UnityDocument.load_yaml(project_settings_file)
  3. ProjectSettings = doc.entry
  4. ProjectSettings.testAttribute = {}
  5. ProjectSettings.testAttribute
  6. ProjectSettings.testAttribute["Test"] = "1"
  7. ProjectSettings.testAttribute["Test"]
  8. doc.dump_yaml()
  9. Open ProjectSettings file

Expected Results:
Project settings file has a new entry called testAttribute with a value of Test = 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant