1
\$\begingroup\$

I'm working on a simple 2D platformer in Unity and have been using the Spriter2Unity tool to import my Spriter animations directly into Unity. I have noticed that this creates large hierarchies of gameobjects within the imported prefabs, basically 1 per image piece.

Since the animations are fairly simple, I am thinking it would be cleaner to import each of them as a spritesheet and hook them up with a spriterenderer on the player object rather than using the importer tool.

Would this actually result in any performance benefit at runtime or are the impacts of animating a lot of game objects at once negligible?

\$\endgroup\$
1
  • \$\begingroup\$ Could you clarify what you mean by "better"? Unless you give a good measure of which to compare to options, it generally comes down to personal opinion. As such, these questions are often closed as primarily opinion based. \$\endgroup\$
    – Gnemlock
    Feb 9 '17 at 10:14
1
\$\begingroup\$

When you import Spriter animations into Unity, then Unity can use the skeleton-based procedural animation system of Spriter. The advantage of that is that you get far more fluent animations, because Unity can interpolate between the different keyframes. The drawback is that this can become a bit CPU-intense.

When you export your Spriter animations to static spritesheets, you will likely get far better performance. You will also get far simpler game objects which are, as you found out yourself, more intuitive to deal with. But on the other hand your animations will be limited to those frames you export, so they won't be as fluent as they could be with procedural animation. You also lose the ability to switch out parts of your sprites at runtime. This isn't a requirement for every game, but for those games where it is required, it's a real killer-feature.

\$\endgroup\$

You must log in to answer this question.

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