hi folks.
i didnt find an answer to this although i think this must be a pretty common problem.
i have an imageatlas in my libgdx-game and i think it would be better to integrate the spine-assets into the "main" atlas.
i have no problem packing the images in the main atlas and the names will be the same as in the spine-atlas.... but how can i tell spine to load the images out of the "main" atlas?
bye
phil
this is my main atlas loading part:
Resolution[] resolutionsGame = {
new Resolution(480, 800, "800x480")
// , new Resolution(768, 1280, "1280x768")
// , new Resolution(1152, 1920, "1920x1152")
};
ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), resolutionsGame);
m_assetManager.setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));
m_assetManager.load("data/imageatlas/pages.atlas", TextureAtlas.class);
later on i load the textureRegions into static vars:
if (m_assetManager.isLoaded(FILE_IMAGE_ATLAS)) {
imageAtlasGame = m_assetManager.get(FILE_IMAGE_ATLAS, TextureAtlas.class);
flagBritain_50px = imageAtlasGame.findRegion("flagBritain_50px");
flagGermany_50px = imageAtlasGame.findRegion("flagGermany_50px");
right now i am loading the spine-atlas like this:
public static SkeletonData getSkeletonData(){
atlas = new TextureAtlas(Gdx.files.internal("data/skeleton.atlas"));
SkeletonJson json = new SkeletonJson(atlas);
SkeletonData skeletonData = json.readSkeletonData(Gdx.files.internal("data/skeleton.json"));
return skeletonData;
}