deepnight / ldtk

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

Read Image Data Error #258

Closed Cammin closed 4 years ago

Cammin commented 4 years ago

I noticed an issue where tileset images are unable to be loaded, even if I try re-referencing them. My suspicion is from the tilde key in the path text between LDtk and windows explorer: image image Is the path having its tilde key changed to an underscore? One more thing to note is that my Samples~ folder is referenced by a symbolic link higher up in the folder tree if that helps out.

Cammin commented 4 years ago

After some more testing, I have been able to fix it by moving the project file back to a former path that it was in, where it attempts to go through the symbolic link's path instead of the referenced path that includes a tilde. I'm thinking the tilde key is the main reason to be causing it. Maybe there could be a way of retaining the tilde in a path for the LDtk editor?

deepnight commented 4 years ago

Hmmmm... That's definitely a very plausible problem. I don't think the dn.FilePath lib I made doesn't support ~. Could you please provide me the faulty path value so I can add support for that before 0.6 release? 🤔

Cammin commented 4 years ago

My symbolic link is named Samples which points to the folder of Samples~, which is likely why it was able to work previously for me because I went down the symbolic link path instead of the real path which contains the tilde. So, I can fix it if I pick the symbolic link's path. 👍

Here's the path value; When the file search goes up one level, it runs into the Samples~ folder: "relPath": "../Sprites/SunnyLand_by_Ansimuz.png"

image image

deepnight commented 4 years ago

I'm not sure to fully understand your file hierarchy here 🤔 Couldn't screen me the tree where the LDtk files & images are stored?

Cammin commented 4 years ago

Here's the folder tree; the LDtk project is stored in the Data folder, and the images are stored in the Sprites folder. image I've to go to bed, but I hope I could help out 🙂

deepnight commented 4 years ago

Thanks I'll check that today :) Have a good night

deepnight commented 4 years ago

This should be fixed by latest git version of my deepnightLibs (if you build LDtk yourself), or will be in 0.6 update today.

haxelib update