• RuntimesUnity
  • skeleton mecanim animation event(unity editor) all gone

Hello
I am using Spine in Unity.
I am using Skeleton Mecanim, and when Skeletondata is modified and newly imported in Unity, all animation clip events that created by UnityEditor are lost.
Please tell me how to import while maintaining the animation clip events set in the Unity editor when the skeleton data is changed.
If it is like this, I cannot use Skeleton Mecanim.

in the thread
https://ko.esotericsoftware.com/forum/d/6435-unity-animation-event-lost
"But if you only want events to be defined through Unity and none through Spine, we can just turn off that feature and leave it out of the dummy animation clip rebuilding process."

How to turn off is there Any setting?
I want only Unity editor animation event!!

  • Misaki ответили на это сообщение.
    Related Discussions
    ...

    nono there is something to preserve unity animation event please help me!!!!
    copy animator back method is not good
    please let me know how to preserver unity animation event!!

    • Misaki ответили на это сообщение.

      bsh0608 As far as I have tried on my end, the animation events set in Unity did not disappear when the skeleton data file was overwritten on the OS file manager to update the animation. This means that if you opened the folder where the .json file or .skel.bytes file for that skeleton existed and updated the skeleton data by overwriting the .json file or .skel.bytes file, the animation event would be maintained. Would the animation events disappear even if you did such an update procedure on your end? If so, please detail the update steps you took, including what changes you made to this skeleton in the Spine Editor.

      • bsh0608 ответили на это сообщение.

        bsh0608 Sorry for the late reply, it took me a while to get back to you as I wanted to test if the animation event actually disappears. Spinebot's answer said that updating the skeleton data would not preserve the animation events set in Unity, but this did not seem to be the case in practice, so I removed it.

        Misaki

        Hi Misaki
        I have tested what you said.
        I made sample Project and download same spine-unity and update using by same proccess
        and then It's stay!
        but in my project in developing that's not works
        so I compare this [SpineEditorUtilities : AssetPostprocessor]
        and then I found difference between my spine-unity and you homepage spine-unity even both same version 4.0.xx
        problem is SkeletonBaker
        maybe this code
        var previousAnimationEvents = AnimationUtility.GetAnimationEvents(clip);
        var animationEvents = new List<AnimationEvent>();
        foreach (Timeline t in animations.Timelines)
        {
        if (t is EventTimeline)
        ParseEventTimeline(ref animationEvents, (EventTimeline)t, SendMessageOptions.DontRequireReceiver);
        }
        AddPreviousUserEvents(ref animationEvents, previousAnimationEvents);
        AnimationUtility.SetAnimationEvents(clip, animationEvents.ToArray());
        EditorUtility.SetDirty(clip);
        unityAnimationClipTable.Remove(animationName);

        after override SkeletonBaker My animation event stay!!
        Thanks you for fast instantly Answer!!
        Your Saved me!
        Misaki!

        @bsh0608 Please always check any issues with the latest version of the spine-unity runtime, otherwise you might be missing important bugfixes. Also note that 4.0 is pretty old already. Please in general always mention your exact spine-unity runtime version (name of the unitypackage, also listed in Assets/Spine/version.txt), otherwise it's much harder to help.