Jump to content

Spriter Data API for Unity


Recommended Posts

  • Replies 80
  • Created
  • Last Reply

Top Posters In This Topic

The Unity3D Spriter API being developed here will basically allow you to take a SCML file directly from spriter and convert it into a character with animation in unity (when combined with f.x. the NGUI plugin). Unfortunately it does not seem to be up to date with the newest SCML format.

Any news on progress Thinksquirrel? (no pressure :D)

Link to comment
Share on other sites

Hallo I m complete new by Spriter and

have to say at first that it is an amazing program.

Congratulation for the developers.

The only think is that i realy dont understand {how i can use the API folder in

Unity}. Please can anybody give an short tutorial how to use the scml in unity.

Link to comment
Share on other sites

Hallo I m complete new by Spriter and

have to say at first that it is an amazing program.

Congratulation for the developers.

The only think is that i realy dont understand {how i can use the API folder in

Unity}. Please can anybody give an short tutorial how to use the scml in unity.

You can't use the current version of Spriter with Unity as this plug-in only supports the earlier Beta format from a few months ago.

Link to comment
Share on other sites

Hey guys,

Progress has been pretty slow. Two other projects that I've been working on have held me up a lot longer than I anticipated. I'll finally be wrapping one of those up within the next two weeks or so, though.

From the road map, I've actually finished reading SCML files in their entirety, including a4 features + things that haven't been added to Spriter yet (check the development branch on GitHub), but haven't been able to get to the actual modules yet. I should be able to finally start work on this in the coming weeks, and get the default module out there (skinned meshes + a texture atlas).

Remember, I am accepting pull requests on this - if someone wants to tackle updating the NGUI and ex2D modules earlier, for example, that would be very much appreciated.

Link to comment
Share on other sites

  • 3 weeks later...

Hi there,

I just forked you on GitHub and am going to see if I can help get some of the coding for this done. I'm not sure exactly how much time I will be able to give to this effort, but every little bit helps - right? I am a tk2D user so I might be focusing on that as well as just updating the other toolkits as needed.

I know Edgar is working on a new release and I am concerned he might be changing the format again (nothing in the private forums about that yet though). Is http://www.brashmonkeygames.com/spriter ... cation.pdf still the latest SCML spec?

Could you give me a feature list that need to be implemented so I can work off that?

Thanks,

Elliot

Link to comment
Share on other sites

Hey Elliot,

I would check out the dev branch on the main repo.

What has been done

I've finished the methods that parse SCML into an object hierarchy (it follows the format specification you linked). So no direct file reading is needed at the moment. That said, it's been a while since I've been able to look at the code (been very busy with work here), so I may have missed a few things.

What needs to be done


  • [*:3onb01zt]Updating the modules. Each module takes the general object hierarchy and actually implements it as sprites and animation data. More specifically:

    • [*:3onb01zt]Updating the NGUI and ex2D modules
      [*:3onb01zt]Creation of a tk2D module

[*:3onb01zt]The creation of SCML write methods (this is lower on the priority list, it allows for SCML export of a Unity hierarchy)

Link to comment
Share on other sites

  • 5 weeks later...
Hi there,

I just forked you on GitHub and am going to see if I can help get some of the coding for this done. I'm not sure exactly how much time I will be able to give to this effort, but every little bit helps - right? I am a tk2D user so I might be focusing on that as well as just updating the other toolkits as needed.

I know Edgar is working on a new release and I am concerned he might be changing the format again (nothing in the private forums about that yet though). Is http://www.brashmonkeygames.com/spriter ... cation.pdf still the latest SCML spec?

Could you give me a feature list that need to be implemented so I can work off that?

Thanks,

Elliot

I know I'm a bit late on responding. The format is quite finalized and changes from here on out will either be additions for features that don't exist yet, or very small changes that shouldn't break existing implementations. It's also possible I may make small changes to things that aren't yet implemented with the editor, like speed curves, sound effects, or entities. But most importantly, any change at this point large or small will be announced and discussed with the community before being finalized. We take the time the community spends making implementations very seriously, and we recognize that working up-to-date implementations is the only way to fully establish scml as a universally supported format.

The main addition in this build will be the ability to have separate keys and timelines for each object. Any implementation made according to the spec should automatically work with this addition.

Also, I've been very busy with the build, especially as it's been late, but after this release, I'll be more active in the forums again, and updating documentation. Curious how far along the Unity plugin is, and if there's anything I can do to help. Can it already be used to create games, etc. Also, I'm always available at lucid@brashmonkey.com for dev questions/support.

Link to comment
Share on other sites

After a few months of using TK2D, here's all that I'd need for Spriter to be as functional as possible:

[*]Support for multiple Box Colliders

As it is, tk2D doesn't support this, and specifically for my game, it is imperative. I asked Unikron, the dev, about this and he said:

At this point there isn't any way to draw multiple colliders into one sprite, I'm afraid. You'll have to roll your own solution for that.

Edit: Create the colliders as children to the main sprite, and make sure the main object alone has a rigid body. That will make the children a compound collider.

I current circumvent this by using SmoothMoves as my skeletal animation suite, which supports multiple colliders, and use it for all animated sprites while tK2D handles static sprites, but this does get pretty annoying to use, having two different animation api's to script with. For me, I'd like Spriter to have a feature to apply a box collider at a specific frame, or be there for the whole animation, and allow for colliders to be set as triggers, too (much like SmoothMoves). I know this a planned feature of Spriter, so my main concern is just how it'll move with Unity.

[*]Support for tk2D animation runtime

The tk2D animation runtime is very easy to use, which is why I would like it if Spriter operated with it. The support of multiple box colliders might have to be added on in the plug-in, which would basically allow the dev to code for the colliders set in the Spriter animation (i.e have the a sword collider trigger a loss of health, a swinging sound, maybe a particle effect that you could apply in the inspector).

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

So if I wanted to use Spriter in conjunction with Unity3D right this moment, what exactly would I need? I read through this thread, but I don't really understand what's usable, what's required, and so on.

Also, I'd like to suggest Futile as one of the frameworks for Unity support. One key selling point is that it's free and open-source, so it would be easier to adopt for anyone who's starting with Spriter and doesn't yet have a Unity toolkit for other 2D work.

Link to comment
Share on other sites

I'm with RXNinja, not really sure where this has landed since almost a year ago the thread started.

I'm interested in use in conjunction with TK2D, but I'd really be happy just knowing how to use the API.

Also the demo doesn't work for me. It suggests that I should install the unity web player, which is already installed and working.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 4 weeks later...
  • 3 weeks later...

Is this still being actively worked on by anyone? The Git doesn't seem to have been touched in a while.

I'm a fairly competent C# developer and I'm about to start on a project that could really benefit from this. In particular I'm interested in 2DTK, but I'm not yet tied to one toolkit exclusively. I'll look into getting things up to date but if there's someone working on it it might be best to help them out rather than do all sorts of redundant work.

Link to comment
Share on other sites

I'm having some trouble integrating sprinter with unity & ex2d,

I was wondering if they where the problems Fabian had.

Or if anyone can help me out.

I've imported to my project:

- ex2d (Full Version)

- Spriter data API

- Spriter data API EX2D

Within the SpriterData_ex2D.cs file, I un-commented from lines 65 to the end.

now I get an error saying:

Assets/Editor/SpriterData_ex2D.cs(98,25): error CS0246: The type or namespace name `ISpriterEntity' could not be found. Are you missing a using directive or an assembly reference?

Assets/Editor/SpriterData_ex2D.cs(99,30): error CS0246: The type or namespace name `ISpriterFile' could not be found. Are you missing a using directive or an assembly reference?

-Thank you Thinksquirrel for an awsome plugin and all the work:)

Link to comment
Share on other sites

Nick-

It sounds like the code you've uncommented is referring to the old (master) version of Spriter data API. Have you grabbed the development branch instead?

I think the API has been updated to the latest SCML spec but the EX2D and NGUI projects have lagged behind. Either they'll need to be updated or you'd have to use the old version, which might completely break with a newer file.

Link to comment
Share on other sites

CptDefault -

thank you very much for your help, still getting an error though.

An interface is missing: ISpriterData but there is an abstract class: SpriterData

The type or namespace name `ISpriterData' could not be found. Are you missing a using directive or an assembly reference?

I tried replacing the interface with the abstract class but some more errors pop up.

thanks again man, i think the ex2D script has to be updated. :)

Link to comment
Share on other sites

Yeah, that seems to be the case. There's been a fairly major restructure of the API. If you want to get it working without bone support and other newer features you can possibly use the old version. Download the master branch (rather than the developer branch, as it sounds like you have) from github. I've got that working with the old NGUI script easily enough. I am hoping to find some time over the next little while to update the NGUI script; after that I might look into the other platforms.

Link to comment
Share on other sites

  • 2 weeks later...

Progress report; perhaps 80% of the way to the latest format. I'm hoping to have a functional NGUI plugin within a week.

I've been updating both the main SpriterDataAPI and the NGUI plugin. The former has had a few structural changes as well as bugfixes. The latter's had a pretty major rewrite.

More details to come once I've got it complete.

Link to comment
Share on other sites

Is there another way to implement this into Unity without having to purchase one of the other plugins?

I really want to purchase this but having to spend $65 or more for a plugin to use this, plus the purchase of this is really tough when your on a indie or almost nothing budget.

Also will Spriter work with PC and MAC?

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...