mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-07 07:44:53 +08:00
[unity] Added null check at Timeline SpineAnimationStateClip. Closes #1800.
This commit is contained in:
parent
88f403f5fc
commit
64dc6f66a4
@ -47,7 +47,7 @@ namespace Spine.Unity.Playables {
|
||||
|
||||
public override double duration {
|
||||
get {
|
||||
if (template.animationReference == null)
|
||||
if (template.animationReference == null || template.animationReference.Animation == null)
|
||||
return 0;
|
||||
return template.animationReference.Animation.Duration;
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ namespace Spine.Unity.Playables {
|
||||
|
||||
var skeleton = skeletonComponent.Skeleton;
|
||||
|
||||
bool skeletonDataMismatch = clipData.animationReference != null &&
|
||||
bool skeletonDataMismatch = clipData.animationReference != null && clipData.animationReference.SkeletonDataAsset &&
|
||||
skeletonComponent.SkeletonDataAsset.GetSkeletonData(true) != clipData.animationReference.SkeletonDataAsset.GetSkeletonData(true);
|
||||
if (skeletonDataMismatch) {
|
||||
Debug.LogWarningFormat("SpineAnimationStateMixerBehaviour tried to apply an animation for the wrong skeleton. Expected {0}. Was {1}",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user