mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[unity] Fixed skeleton binary import, was broken by recent changes. Closes #1259.
This commit is contained in:
parent
76fef7a182
commit
92a0d37e9b
@ -566,10 +566,10 @@ namespace Spine.Unity.Editor {
|
||||
SkeletonBinary binary = new SkeletonBinary(new AtlasRequirementLoader(requiredPaths));
|
||||
Stream input = null;
|
||||
TextAsset data = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonDataPath);
|
||||
if (data != null) {
|
||||
if (data == null) {
|
||||
// On a "Reimport All" the order of imports can be wrong, thus LoadAssetAtPath() above could return null.
|
||||
// as a workaround, we provide a fallback reader.
|
||||
input = File.Open(skeletonDataPath, FileMode.Open);
|
||||
input = File.Open(skeletonDataPath, FileMode.Open, FileAccess.Read);
|
||||
}
|
||||
else {
|
||||
input = new MemoryStream(data.bytes);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user