mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 23:05:01 +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;
|
||||
|
||||
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++) {
|
||||
if (fromAnimation[i].Length == 0 || toAnimation[i].Length == 0)
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user