2
\$\begingroup\$

I want to use bone animations in my 2D game for Unity (5.0 beta). I am trying Spriter. Apparently, it has no official Unity support. There was some guy, back in 2014, who posted a plugin to convert Spriter files to Unity prefabs here: http://brashmonkey.com/forum/index.php?/topic/3365-spriter-for-unity-43-updated-integrated/.

However, the plugin does not seem to work (perhaps it is because I am using 5.0 beta).

There are deprecated lines, like

AnimationUtility.SetAnimationType(animClip, ModelImporterAnimationType.Generic);

Or

 UnityEditor.Animations.AnimatorController.AddAnimationClipToController(controller, animationClip);

If you remove them, of course it won't be able to properly export your files.

So my question is: is there a reasonable to use Spriter animations in Unity? I know I could just export to a spritesheet, but I was hoping to use bones for super fluid animations (I have several characters so I don't really want to make lots of spritesheets). Or perhaps there is a better bone-based solution for 2D animation in Unity?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

This is one of the problems with early adoption - third party extensions may not catch up right away.

The way I see it, you have two options:

  1. Use Unity 4.x until an extension becomes available for 5.
  2. Update the extension's code yourself.

If your heart is set on using Unity 5, then you'll have to take care of these issues on a case by case basis. I suspect that static methods such as AnimationUtility.SetAnimationType have been moved to the applicable object, ie AnimationClip, in order to align with OOP principles. However, I don't have the Unity 5 beta to check, and it seems the documentation hasn't been updated for 5 yet.

Update: According to this, Spriter2Unity has been updated to be compatible with Unity 5.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .