Skip to content

Image assets fail to load when not at root of assets folder

When using load_spritesheet, I am trying to load an asset that is not at the root of the assets folder. ie, "sprites/knight/Run.json". The json specifies a filepath of "run-sheet.png". This causes the metadata to ask the asset loader for "run-sheet.png", which will fail because it needs "sprites/knight/run-sheet.png".

Am I approaching this wrong? I would expect the path inside the .json to be relative to the .json (and basically always a sibling). So i'm surprised that the load_spritesheet logic does not treat it this way.