Skip to content

Add support for Table of Content entities to be listed in "instancesData" json entry#57

Merged
Madour merged 1 commit intoMadour:masterfrom
NeilConnatty:TOC-instances-fix
Feb 22, 2026
Merged

Add support for Table of Content entities to be listed in "instancesData" json entry#57
Madour merged 1 commit intoMadour:masterfrom
NeilConnatty:TOC-instances-fix

Conversation

@NeilConnatty
Copy link
Contributor

Encountered when using LDtk v.1.5.3.

My ldtk file had table of content instances listed under "instancesData" rather than "instances". An "instances" entry was still present under toc, just empty. I left support in the code to get entity refs from both "instances" and "instancesData".

Tested using attached test.ldtk file (had to change extension to .json for GitHub to let me upload it).
test.json

@Madour
Copy link
Owner

Madour commented Feb 22, 2026

Thank you for the PR.

Looking at LDtk json's documentation, "instancesData" was added in 1.5.0 and "instances" was deprecated (https://ldtk.io/json/#ldtk-ProjectJson;toc).
So it is definitely an oversight from me.

Thank you for noticing !

@Madour Madour merged commit fe57dcc into Madour:master Feb 22, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants