mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-26 19:51:47 +08:00
[unity] Fixed skeleton binary import, was broken by recent changes. Closes #1259.
This commit is contained in:
parent
3c06a0881f
commit
065c13f498
@ -566,10 +566,10 @@ namespace Spine.Unity.Editor {
|
|||||||
SkeletonBinary binary = new SkeletonBinary(new AtlasRequirementLoader(requiredPaths));
|
SkeletonBinary binary = new SkeletonBinary(new AtlasRequirementLoader(requiredPaths));
|
||||||
Stream input = null;
|
Stream input = null;
|
||||||
TextAsset data = AssetDatabase.LoadAssetAtPath<TextAsset>(skeletonDataPath);
|
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.
|
// 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.
|
// as a workaround, we provide a fallback reader.
|
||||||
input = File.Open(skeletonDataPath, FileMode.Open);
|
input = File.Open(skeletonDataPath, FileMode.Open, FileAccess.Read);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
input = new MemoryStream(data.bytes);
|
input = new MemoryStream(data.bytes);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user