deepnight / ldtk

Modern, lightweight and efficient 2D level editor
https://ldtk.io
MIT License
3.45k stars 192 forks source link

The custom field values do not match what is displayed in the editor #1141

Open liu-y-d opened 1 month ago

liu-y-d commented 1 month ago

Hello I am trying to parse JSON using the QuickType way and implement some automated functions. Currently, I am encountering an issue related to Field instances. I attempted to modify the value of a certain property within a FieldInstance using the setValue method and then rewrite it back to the JSON file. However, after reloading the project, I found that the value in the editor had not changed. Upon reviewing the relevant documentation, I discovered that __value is a redundant field, and realEditorValues is actually the value used by the editor. However, the documentation states that there is no need to pay attention to the realEditorValues field. So, is there any other way to achieve this functionality? image