ldtk
ldtk copied to clipboard
Level names not unique in Json
While testing out the features of the level background position in every configuration, I stumbled across levels with the same name. In this zip is the project+texture: LevelUniqueness.zip
(Note: I created each level by duplicating them.) (Note: Auto level identifiers are enabled.)
- I save the project.
- In the JSON, levels 34-39 in the editor were 14-19 in the json, resulting in duplicate level identifiers for the levels 14-19.
- However in LDtk, the levels are displayed as unique as expected. Which is different than what's in the JSON.
I tried closing+reopening the editor, but I still faced the same situation. I was able to fix the issue by turning the level auto-names for the incriminating levels off, THEN on again, then saving. (The shared zip has the contents before I fixed them)
I have a similar (or the same?) issue. I created four levels and everything was fine. Then I swapped two of the levels in the editor, saved, and suddenly my HaxeFlixel project complained about there being multiple Level_3
s. I opened the .ldtk file in a text editor and sure enough, two levels were called Level_3
now. I had to disable auto-names for every level, save, re-enable, then save again to fix this.
I'm not sure why the editor shows everything perfectly fine (it immediately changed the numbering after reordering the levels) when the project file seems to have the wrong data 🤔