Jump to content

Unity engine implementation and C# Import/Export API


Recommended Posts

Hey guys,

8E7QT.png

I've created a C# Import/Export API for Spriter in the Unity engine. This abstracts all of the SCML data into objects, and provides methods for importing/exporting Spriter data into other systems. A developer using the API would not need to worry about parsing SCML files at all.

It currently uses a few Unity data structures (such as a Rect and Vector3s), but these are fairly standard and can easily be implemented for other environments, such as XNA. For the first API implementation, I've created import functionality for NGUI, and am working on implementations for other popular 2D packages.

All of the sprites are automatically added to an atlas (trimmed to fit), padding is applied to trimmed space, and a character object is automatically created with all animations. One-button import:

WxA7cl.png

The final character is only 1 draw call, depth sorted, and can even be combined with an existing atlas. Animation data is converted into Unity's native animation format; of course, this can be changed depending on the importer implementation.

Here's a Web Player example scene. There are a few animation tweaks and artifacts that still need to be taken care of:

Web Player Demo

Let me know what you guys think!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...