Skip to content

Commit

Permalink
fix: TexturePacker fixes the wrong path for the atlas file. (#3124)
Browse files Browse the repository at this point in the history
In this [PR](#3103) we updated
the code to use `Flame.images` because of this change now the atlas file
and the sprite sheet both must be under the `assets/images/` directory.

Trying to run the example project will crash because the atlas find
cannot be found.

This MR fixes the problem by loading the `.atlas` file correctly from
the images directory.

Co-authored-by: Lukas Klingsbo <[email protected]>
  • Loading branch information
Yayo-Arellano and spydon authored Apr 18, 2024
1 parent db4b6fd commit 69f5c38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Future<_TextureAtlasData> _parse(
if (fromStorage) {
fileAsString = await File(path).readAsString();
} else {
fileAsString = await Flame.assets.readFile(path);
fileAsString = await Flame.assets.readFile('images/$path');
}

final iterator = LineSplitter.split(fileAsString).iterator;
Expand Down

0 comments on commit 69f5c38

Please sign in to comment.