mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[unity] Fixed Apply Regions as Texture Sprite Slices failing when filename contains . before extension. Closes #2246.
This commit is contained in:
parent
d9fff16b5f
commit
cf68a29da1
@ -320,12 +320,11 @@ namespace Spine.Unity.Editor {
|
||||
List<SpriteMetaData> sprites = new List<SpriteMetaData>(spriteSheet);
|
||||
|
||||
List<AtlasRegion> regions = SpineAtlasAssetInspector.GetRegions(atlas);
|
||||
char[] FilenameDelimiter = { '.' };
|
||||
int updatedCount = 0;
|
||||
int addedCount = 0;
|
||||
|
||||
foreach (AtlasRegion r in regions) {
|
||||
string pageName = r.page.name.Split(FilenameDelimiter, StringSplitOptions.RemoveEmptyEntries)[0];
|
||||
string pageName = System.IO.Path.GetFileNameWithoutExtension(r.page.name);
|
||||
string textureName = texture.name;
|
||||
bool pageMatch = string.Equals(pageName, textureName, StringComparison.Ordinal);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user