• RuntimesUnity
  • It's hard to tell, some case of sfx triggered by event works weird

i mean, i made an animation, 30 frames play in 60fps and 3 events of sfx trigger,
but when it plays in unity, sfx goes like played like triple times and stop and play triple again
it sounds just like burst mode of gunshot

    Related Discussions
    ...

    It sounds like you might be encountering an issue where events are being triggered multiple times per frame, which can happen if the animation is being updated more frequently than expected. This could be due to the way the animation is being updated in Unity. Make sure that you are not manually calling Update or Apply on the SkeletonAnimation component, as this should be handled automatically by the component itself. Additionally, check that you are not setting the animation repeatedly in a way that causes it to restart every frame, as this can also lead to events being triggered multiple times. If the problem persists, you might want to isolate the issue in a minimal Unity project to better understand what might be causing the multiple event triggers.

    rmx Fps do not matter. When the delta time of a game frame advances the animation time past one or multiple events, they are triggered. And according to eventThreshold during an animation transition when mixing multiple animations.

    If you hear the event triggering too often, likely your game logic code is doing something wrong, either registering to the event multiple times, starting the animation multiple times or the like.