添加容错

This commit is contained in:
xiekaidong 2023-06-25 10:31:05 +08:00
parent 55d5d06505
commit 8231fc3cc5
3 changed files with 9 additions and 6 deletions

View File

@ -251,6 +251,7 @@ namespace BF
{
List<float> times = new List<float>();
var animation = skeletonGraphic.skeletonDataAsset.GetAnimationStateData().SkeletonData.FindAnimation(name);
if (animation != null){
foreach (var timeline in animation.Timelines)
{
var eventTimeline = timeline as Spine.EventTimeline;
@ -262,6 +263,8 @@ namespace BF
}
}
}
}
return times;
}