Jump to content

Spriter for Unity 4.3


Recommended Posts

Oh wow there are 2 people working on plugins, I feel like I'm late to some sort of plugin party.

Whoa, i never thought about it. I assume that animation going from spriter is final and definite, so i dont even plan anything like that :/ Also, it would require to implement the IK on my side as well as attaching colliders to almost everything :/

I hadn't really thought about it until yesterday either, but you can see why it'd be super useful, I'd actually pay money for that kind of feature, its up there with mesh deformation for me.

The collider thing would be sort of strange I guess, especially with everyone implementing different collision methods within their game, and using a box collider on a foot wouldn't be wise at all, though I believe its usually done without colliders, theres just something else that detects the terrain (raycasting I guess, I'm not much of a coder, all artist here) then throws the angle back to the bones and the bones move accordingly, or at least this is my understanding of it from using previous IK systems, including the old unity one.

IK would be very cool and incredibly useful in many cases - notably, if you want to aim a weapon you could IK the arm. I haven't looked into what this would take but I'm very open to the idea once I get the base native Unity plugin functional.

I hadn't really given much more thought than the legs honestly, and the arms too of course, I was recently playing LIMBO and noticed that it happens there, along with reaching out to grab-able objects if they're within a certain distance, figured IK was the only possible way really. Its great to hear you're open to the idea though.

Link to comment
Share on other sites


a good example project is: http://www.brashmonkey.com/temp/GreyGuy.zip

there are a few animations along with sprites changing. i'm using it as a test for each update to S2U


colliders or raycasts, these would still require to have some kind of collider on the ground, so it's forcing some kind of pipeline etc etc (and there are 2 kinds of physics in unity now so the tool should also work for any of them). you'd have to also add some kind of physics to character anyway as it has to interact with the ground without floating and it becomes a bit more complicated when the ground is not (approximately) flat.

it also goes way beyond of what Spriter offers - it's a tool for animation and i can hardly imagine solving the problem you're talking about via animation only. i would be against adding functionality like that to Spriter2Unity explicitly, would rather advise creating a new tool / module for that (as it would break encapsulation and increase complexity while it's not necessary)

Link to comment
Share on other sites

could you help me

why i change the animation ,but the picture is not change???

the mac convert have a bug,i use the three picture (hand bone )in the one animation,but when i put the unity the picture is just show one picture in all the one animation!

i make a video that you can see the question!!:)!


i use the win7or spriterB5 and spriterB6(mac or win ) try,the bug is the same ..

i use the python2.7.6,mac10.9,unity4.3.2f1. spriter pro editionB6.1!

i am so hurry,thank youï¼ï»¿

Link to comment
Share on other sites

as you can see, events sent by the animations have no receiver. i'd guess that you forgot to copy content of the UnityAssets directory to Assets of your project (so that you have, in your project, [Project]/Assets/Spriter2Unity/[something something]), so that the script that should be assigned doesn't work and the animations have no target to send events to.

try downloading the newest version of S2U, export your project again with it, but this time remember about copying content of UnityAssets.

Link to comment
Share on other sites

could you help me again..

i try it again! it`s no use ! the error how can i to fix the error?

i am feel so trouble! i want to solve the problem to continue the game develop.but it's stop in the....

what should i do??

Excuse me,could you give me a success to unity project file?or

could you give me you other contact (email or telephone and so on..) ?

You can write the other contact to my e-mail :pjwaixingren@me.com

thank you.:)!


Link to comment
Share on other sites

The plugin version of S2U is mostly functional at this point. There are still some issues (multiple sprites with the same name in your project can cause problems) but I'd love for a few people to start trying it out. The repository is located at https://github.com/mythgarr/Spriter2Unity

I'd like to emphasize that this wouldn't have happened without Malhavok's initial implementation and continued advice.

To use, copy the contents of the UnityPlugin/Assets folder into your own Assets folder. Any SCML files in your project should be automatically imported.

This will create prefabs in the same folder as the SCML. Similar to importing an FBX file, the prefab will contain all of the animations from the SCML.

Let me know if/when you run into problems!

Link to comment
Share on other sites

It might make sense for me to start a new thread for this at some point simply to better manage release notes.



  • [*:2cklsuxh]Avatar generation has been removed until it can be developed further
    [*:2cklsuxh]References to AnimationClip and Prefab will be retained when re-importing SCML file
    [*:2cklsuxh]Linear, Instant, Quadratic and Cubic curve types on Timeline are now supported
    [*:2cklsuxh]Removing an animation from the SCML will remove the corresponding clip within Unity
    [*:2cklsuxh]Added a SpriteMaterial property to CharacterMap that allows you to easily modify the material of all sprites at once

Upcoming Features

  • [*:2cklsuxh]Import of curves applied to Mainline
    [*:2cklsuxh]Import of Quintic, Quartic and Bezier curves by resampling (lossy conversion)
    [*:2cklsuxh]Import any additional character maps from SCML
    [*:2cklsuxh]Custom Inspector for CharacterMap to simplify reskinning within Unity

Link to comment
Share on other sites

mythgarr when I try to do it your way, it throws me a prefab without any reference image ... I am using the sample project brashmokey ...

Malhavok: your way it generates the images and ect ... But he does not think the reference file. js ... (I added the path's straight-laced to add that spoke here in the forum).

Link to comment
Share on other sites


I am interested in porting this to a native Unity editor plugin. Has there been any work along those lines, or should I just start working on a new branch?

Just curious - any progress on your native plugin?

During the spriter kickstarter/beta I started to put a c# .net implementation together (starting with traversing the spriter file for filenames, and making an atlas for all sprites together).

Link to comment
Share on other sites

  • 2 weeks later...

Hey malhavok. I love your plugin but really need something that works for the newest version of spriter beta. I was wondering if I could give you some cash to update it for that. I'm sure you plan on implementing all the spriter features eventually, but was wondering if I could kickstart that process a little.

Link to comment
Share on other sites

Hi mythgarr

I see in your last update for your plugin, you made it that the first frame of the animations are hidden. Is there any particular reason why you did this? I am just wondering if it was of any consequence. I removed it for the time-being (I am not really far into making a game yet, but I am adding a character and don't want a hidden frame). I feel like I am missing the point.

Thank you :)

Link to comment
Share on other sites

  • 2 weeks later...

Hello everyone,

My apologies for not noticing these responses sooner - I thought I was subscribed to this thread. Some personal matters have prevented me from working on the plugin for the past month or so, but now I'm ready to resume work. The main bug I'm aware of is that sprites are not hiding/showing properly during the animation. I'm working on a fix for this right now.

Denzilb55: Hiding all sprites at t=0 is a hack to hide any sprites that shouldn't show up by default. I'm working on a much more elegant solution that should fix this and several related problems.

Solo: What features are you looking for, specifically? Preview features (such as deforming sprites) are not final. If there is some must-have feature you can create a bug for it on the github (https://github.com/mythgarr/Spriter2Unity/issues).

Dr9: The native plugin is mostly functional, but I'm polishing up some rough edges and bugs (see above).

Link to comment
Share on other sites

  • 2 weeks later...

My timing could certainly be better, but I'm going to have to stop working on the Unity plugin version of Spriter2Unity. I'm starting a new job which shares enough in common with the project that it constitutes a conflict of interest. I hope somebody else will be able to take the existing code base and improve upon it - I realize there's still a lot of work to be done, but I really don't have any other option.

Best of luck,


Link to comment
Share on other sites

Ahh crap this is bad news bears =/ Having some minor issues with the plugin that are causing it to be unusable in my workflow (at least to my knowledge, I could be missing something simple) Any chance Malhavok could pick it back up? Or some other intrepid Unity user?

Link to comment
Share on other sites

  • 4 weeks later...

Well even if it's been temporarily discontinued, I have a question. I doun't doubt that there's SOMEONE here who can answer this. The question is simple: I decided to test it out before I start applying its ways to my own projects, so I decided to import the Grey Guy. When I import the .scml file, it imports the animations and everything -almost- alright. I'm able to attach a controller and manipulate the animation. The problem is with the way the Grey Guy is drawn. It draws all the parts in the wrong order, making his head appear behind his torso, etcetera.


What I'm wondering is, is there something I did wrong while importing it? Do I have to manually change ALL of the part's layer info so that it will be drawn in the correct order? I can't imagine that no one else has ever run into this problem.

Link to comment
Share on other sites

Hey, just a quick, wild speculation...

I think the z-ordering is wrong. Either you're drawing it incorrectly (in the wrong order) or your code is loading the z_index incorrectly.

And maybe some good news for Unity developers (maybe not, though)...

I'm working on a generic C# library that loads all of this for you -- you'll still need to draw it, but I'm going to try to get ALL of the guesswork out of it -- i.e. load the SCML file, handle the objects and animate/deform them.

You'll still have to render them, but at that point, it'll just be reading the pieces of data in from the current handle you have to an animation/etc, and then draw based on that information.

My question is -- does anyone in the Unity side of things know which version of .NET they support? How far up are they? I need to use *at least* 3.0, I believe (because my mapping functions rely on Action. It may even be possible to port it back to .NET 2.0 (if I manually create an Action), but no promises on that -- I haven't done enough exploration into it to see if that'll work.

Let me know, if anyone from Unity has some technical knowledge or can hunt it down for me!

Link to comment
Share on other sites

Messing with the Z scale does nothing. (I don't think the Z axis even matters in 2D mode) The only thing that does something is manually setting each indiviudal part's "Order in Layer" value. I'm a bit new to unity though so there could be a million things that cause this. But I assure you I haven't really touched any major settings.

Although I have been examining the .cs files in the Spriter2Unity folder. Strangely enough I seem to understand most of the stuff that's happening despite being totally unfamilliar with anything C-based. I wonder if I can tweak the script a little to make it set the "Order in Layer" value as the PreFab is being created? Although can that value even be changed before an instance is created?

Oh here's another funny tidbit. I've deleted the object and all its assets and reimported the thing several times to see what happens, and one thing stands out. In Scene view, the character looks completely normal. It's only drawn in reverse in Game view. Even when I turn it to 3D mode for a second and rotate around it it still looks the same from the other side, so I don't really think it's a camera thing.

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.

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