mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[unity] Fixed automatic partial re-import when atlas png texture and/or material have been deleted and re-exported. Closes #1650.
This commit is contained in:
parent
f04a7b38ca
commit
d0770a99cb
@ -349,6 +349,8 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
AddDependentAtlasIfImageChanged(atlasPaths, imagePaths);
|
||||
|
||||
// Import atlases first.
|
||||
var newAtlases = new List<AtlasAssetBase>();
|
||||
foreach (string ap in atlasPaths) {
|
||||
@ -453,6 +455,18 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
}
|
||||
|
||||
static void AddDependentAtlasIfImageChanged (List<string> atlasPaths, List<string> imagePaths) {
|
||||
foreach (var imagePath in imagePaths) {
|
||||
string atlasPath = imagePath.Replace(".png", ".atlas.txt");
|
||||
if (!System.IO.File.Exists(atlasPath))
|
||||
continue;
|
||||
|
||||
if (!atlasPaths.Contains(atlasPath)) {
|
||||
atlasPaths.Add(atlasPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void AddDependentSkeletonIfAtlasChanged (List<PathAndProblemInfo> skeletonPaths, List<string> atlasPaths) {
|
||||
foreach (var atlasPath in atlasPaths) {
|
||||
string skeletonPathJson = atlasPath.Replace(".atlas.txt", ".json");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user