Fix/textureatlas import error (#1017)

* Ensure that location of PNG is resolved relative to the JSON file directory in TexturePacker processor

* Bump version to 5.0.2

* Update tests
This commit is contained in:
Christopher Whitley
2025-08-24 03:20:29 -04:00
committed by GitHub
parent fee16bbd91
commit fd8eead241
5 changed files with 26 additions and 24 deletions
@@ -8,9 +8,9 @@ using MonoGame.Extended.Content.TexturePacker;
namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
{
[ContentImporter(".json", DefaultProcessor = "TexturePackerProcessor", DisplayName = "TexturePacker JSON Importer - MonoGame.Extended")]
public class TexturePackerJsonImporter : ContentImporter<TexturePackerFileContent>
public class TexturePackerJsonImporter : ContentImporter<ContentImporterResult<TexturePackerFileContent>>
{
public override TexturePackerFileContent Import(string filename, ContentImporterContext context)
public override ContentImporterResult<TexturePackerFileContent> Import(string filename, ContentImporterContext context)
{
var tpFile = TexturePackerFileReader.Read(filename);
@@ -27,7 +27,7 @@ namespace MonoGame.Extended.Content.Pipeline.TextureAtlases
}
}
return tpFile;
return new ContentImporterResult<TexturePackerFileContent>(filename, tpFile);
}
}
}