Merge pull request #496 from EsotericSoftware/unity-atlas-ingest-fix

[Unity] Atlas ingestion safety
This commit is contained in:
John 2015-12-29 04:12:43 +08:00
commit 66908cb2af

View File

@ -764,8 +764,8 @@ public class SpineEditorUtilities : AssetPostprocessor {
string[] atlasLines = atlasStr.Split('\n');
List<string> pageFiles = new List<string>();
for (int i = 0; i < atlasLines.Length - 1; i++) {
if (atlasLines[i].Length == 0)
pageFiles.Add(atlasLines[i + 1]);
if (atlasLines[i].Trim().Length == 0)
pageFiles.Add(atlasLines[i + 1].Trim());
}
atlasAsset.materials = new Material[pageFiles.Count];