From 02ecbae91c1a9bc4c7f1b48ae6ad47b7355d1a8d Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Tue, 14 Apr 2020 18:29:08 +0200 Subject: [PATCH] [libgdx] SkeletonViewer, look harder for atlas using common Unity suffixes. --- .../src/com/esotericsoftware/spine/SkeletonViewer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java b/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java index c72f12cc8..35b1c599e 100644 --- a/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java +++ b/spine-libgdx/spine-skeletonviewer/src/com/esotericsoftware/spine/SkeletonViewer.java @@ -142,9 +142,12 @@ public class SkeletonViewer extends ApplicationAdapter { FileHandle atlasFile (FileHandle skeletonFile) { String atlasFileName = skeletonFile.nameWithoutExtension(); + if (atlasFileName.endsWith(".bytes")) atlasFileName = atlasFileName.substring(0, atlasFileName.length() - 6); if (atlasFileName.endsWith(".json") || atlasFileName.endsWith(".skel")) atlasFileName = atlasFileName.substring(0, atlasFileName.length() - 5); + if (atlasFileName.endsWith(".bytes")) atlasFileName = atlasFileName.substring(0, atlasFileName.length() - 6); FileHandle atlasFile = skeletonFile.sibling(atlasFileName + ".atlas"); + if (atlasFile.exists()) atlasFile = skeletonFile.sibling(atlasFileName + ".atlas.txt"); if (!atlasFile.exists()) { if (atlasFileName.endsWith("-pro") || atlasFileName.endsWith("-ess")) atlasFileName = atlasFileName.substring(0, atlasFileName.length() - 4);