Spriter2UnityDX icon indicating copy to clipboard operation
Spriter2UnityDX copied to clipboard

Many bugs when imported to Unity

Open gabrieltva opened this issue 8 years ago • 3 comments

Hi guys,

I am trying to import an animation to Unity, and in the 80% of the cases, it's fail. Why this happen?

Here is an animation on the Spriter Pro, and the same in the Unity, after the import: out-17-2016 13-28-31

In Unity: out-17-2016 13-28-15

Is not only this animation that the problem occurred.

Can you help me?

gabrieltva avatar Oct 17 '16 15:10 gabrieltva

This is old, but if anyone have this problem could try insert this at the end of Build method inside AnimationBuilder (Spriter2UnitDX/Editor):

EditorCurveBinding[] curveBindings = AnimationUtility.GetCurveBindings(clip);
AnimationCurve animCurve;
foreach (EditorCurveBinding curveBinding in curveBindings)
{
    if (curveBinding.propertyName != "DisplayedSprite" && curveBinding.propertyName != "m_IsActive")
    {
        animCurve = AnimationUtility.GetEditorCurve(clip, curveBinding);
        for (int i = 0; i 

That solution was done by @FedericoCara. I just added the "if". You could try to remove it if not work.

CarlosHBP avatar Jun 17 '17 13:06 CarlosHBP

I know this is old but I wanted to thank you anyways. I was not able to use any animationen I made in spriter without practically redoing them in unity after the import crashed so many weird sprite movement. This solution is CRUCIAL and should be added immeadiatly into the repository!

TheItCrOw avatar May 18 '20 13:05 TheItCrOw

Feel free to make a fork and make the change. I haven't supported this thing in ages.

Dharengo avatar May 18 '20 14:05 Dharengo