diff --git a/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs b/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs index c76b3387d..a652f24ce 100644 --- a/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs +++ b/Assets/Scripts/Component/Helper/CharacterSpineHelper.cs @@ -251,17 +251,20 @@ namespace BF { List times = new List(); var animation = skeletonGraphic.skeletonDataAsset.GetAnimationStateData().SkeletonData.FindAnimation(name); - foreach (var timeline in animation.Timelines) - { - var eventTimeline = timeline as Spine.EventTimeline; - if (eventTimeline != null && eventTimeline.Events.Length > 0) + if (animation != null){ + foreach (var timeline in animation.Timelines) { - foreach (var eventInfo in eventTimeline.Events) + var eventTimeline = timeline as Spine.EventTimeline; + if (eventTimeline != null && eventTimeline.Events.Length > 0) { - times.Add(eventInfo.Time); + foreach (var eventInfo in eventTimeline.Events) + { + times.Add(eventInfo.Time); + } } } } + return times; } diff --git a/Assets/lua/app/bf/unity/character_spine_object.lua.bytes b/Assets/lua/app/bf/unity/character_spine_object.lua.bytes index cf614cb9e..3e48ebcba 100644 Binary files a/Assets/lua/app/bf/unity/character_spine_object.lua.bytes and b/Assets/lua/app/bf/unity/character_spine_object.lua.bytes differ diff --git a/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes b/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes index 488cad2ae..18813a1b9 100644 Binary files a/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes and b/Assets/lua/app/module/battle/component/battle_unit_comp.lua.bytes differ