mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 02:36:56 +08:00
[unity] Make SkeletonDataAsset safer to create at runtime.
This commit is contained in:
parent
13f433d13d
commit
ee324f4bde
@ -161,6 +161,11 @@ namespace Spine.Unity {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
stateData.DefaultMix = defaultMix;
|
stateData.DefaultMix = defaultMix;
|
||||||
|
|
||||||
|
// For compatibility with runtime-instantiated SkeletonDataAsset.
|
||||||
|
if (fromAnimation == null || toAnimation == null)
|
||||||
|
return;
|
||||||
|
|
||||||
for (int i = 0, n = fromAnimation.Length; i < n; i++) {
|
for (int i = 0, n = fromAnimation.Length; i < n; i++) {
|
||||||
if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0)
|
if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user