Crash
For any instances where TilesetRectangle icon is used (IntGridValueDefinition, EnumValueDefinition, EntityDefinition, FieldInstanceAutoLayerRuleGroup), If I delete its tileset definition, but check back on it to readjust, I get a crash, likely due to reading a tileset definition that has become null. (see video)
Json
In addition to the crash, these rectangle objects can have their uid still point to a uid tileset that no longer exists, which can cause unexpected behaviour in an importer. I can safely check if the definition doesn't exist if the uid isn't in its dictionary lookup, but it hasn't been a scenario I've had to account for before. I think the right thing to do in this situation is:
"When a tileset definition is deleted, for all tileset rectangles that use this tileset def, turn them null"
LDtk version: 1.5.3-64bits
Cannot read properties of undefined (reading 'embedAtlas')
TypeError
TypeError: Cannot read properties of undefined (reading 'embedAtlas')
at ui_modal_panel_EditEntityDefs.updateEntityForm (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:303398:10)
at ui_modal_panel_EditEntityDefs.selectEntity (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:303011:8)
at new ui_modal_panel_EditEntityDefs (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:302847:9)
at page_Editor.onAppCommand (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:234605:5)
at App.executeAppCommand (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:3632:24)
at HTMLButtonElement.<anonymous> (file:///C:/Users/cameo/AppData/Local/Programs/ldtk/resources/app.asar/assets/js/renderer.js:233079:11)
at HTMLButtonElement.dispatch (C:\Users\cameo\AppData\Local\Programs\ldtk\resources\app.asar\assets\js\jquery.min.js:2:43064)
at v.handle (C:\Users\cameo\AppData\Local\Programs\ldtk\resources\app.asar\assets\js\jquery.min.js:2:41048)
Crash For any instances where TilesetRectangle icon is used (
IntGridValueDefinition
,EnumValueDefinition
,EntityDefinition
,FieldInstance
AutoLayerRuleGroup
), If I delete its tileset definition, but check back on it to readjust, I get a crash, likely due to reading a tileset definition that has become null. (see video)Json In addition to the crash, these rectangle objects can have their uid still point to a uid tileset that no longer exists, which can cause unexpected behaviour in an importer. I can safely check if the definition doesn't exist if the uid isn't in its dictionary lookup, but it hasn't been a scenario I've had to account for before. I think the right thing to do in this situation is: "When a tileset definition is deleted, for all tileset rectangles that use this tileset def, turn them null"
https://github.com/deepnight/ldtk/assets/55564581/e906fa82-78b2-4921-bd45-3d1023ac0575
Stack:
Processes:
Log: