mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[unity] Handle TextAssets not found.
This commit is contained in:
parent
09fbf32ece
commit
254ee1f8a7
@ -567,7 +567,8 @@ namespace Spine.Unity.Editor {
|
|||||||
imagePaths.Add(str);
|
imagePaths.Add(str);
|
||||||
break;
|
break;
|
||||||
case ".json":
|
case ".json":
|
||||||
if (IsSpineData((TextAsset)AssetDatabase.LoadAssetAtPath(str, typeof(TextAsset))))
|
var jsonAsset = (TextAsset)AssetDatabase.LoadAssetAtPath(str, typeof(TextAsset));
|
||||||
|
if (jsonAsset != null && IsSpineData(jsonAsset))
|
||||||
skeletonPaths.Add(str);
|
skeletonPaths.Add(str);
|
||||||
break;
|
break;
|
||||||
case ".bytes":
|
case ".bytes":
|
||||||
@ -1186,6 +1187,8 @@ namespace Spine.Unity.Editor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsSpineData (TextAsset asset) {
|
public static bool IsSpineData (TextAsset asset) {
|
||||||
|
if (asset == null) return false;
|
||||||
|
|
||||||
bool isSpineData = false;
|
bool isSpineData = false;
|
||||||
string rawVersion = null;
|
string rawVersion = null;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user