Jump to content

Spriter for Unity 5.0


Recommended Posts

I've just encountered Spriter for the first time (during the Global Game Jam).  I would love to use these Spriter animations directly within Unity, so I'm quite excited about your project.

But I'm less excited about keeping up with this thread and managing the package manually.  Have you considered submitting it to the Asset Store?  You could even charge a few bucks; even though it's free, I'd gladly pay for the convenience of having it right there with all my other assets, easily check for and install updates, etc.

(Or you could make it a free asset, if that's what your conscience demands, though I certainly think you deserve some funding for all your hard work.)

Link to post
Share on other sites
  • Replies 356
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

IMPORTANT: BEFORE POSTING YOUR BUGS/ISSUES, PLEASE CHECK THE "KNOWN ISSUES" PARAGRAPH TO SEE IF I ALREADY KNOW ABOUT YOUR ISSUE. THE AMOUNT OF REPEATED REPORTS OF THINGS I ALREADY KNOW ABOUT IS GETTIN

Amazing, Awesome, Stupendous stuff Dengar! You're a treasure to the Spriter community! :)   Cheers, Mike at BrashMonkey

I've never seen this error before. And I've deleted my prefabs and recreated them countless times. Besides, that code that you pointed out is supposed to run when there ISN'T a prefab file.      

Posted Images

  • 2 weeks later...
On 4/7/2015 at 11:28 PM, Dengar said:

v1.0.4:

Fixes:

-AnimationEvents are now preserved between reimports

-SpriteSwapper renamed to TextureController to avoid confusion

-Fixed a z-position issue with the SortingOrderUpdater

Hey Dengar,

I have an issue with the z-position, and have made a post with regards to the issue: 

I do not mean to spam but since you encourage users to inform you of issues, so i would like to try my luck here.

 

Regardless, the tl;dr version of the post is:

  • when I instantiate a spriter prefab, one of the sprite which is supposed to be at the far back, is now in the far front
  • I instantiated the spriter prefab in more than 1 "scenes", and one of it works fine
  • both of them are instantiated the same way, using the same methods/functions.

 

Any input is appreciated, thanks in advance!

Link to post
Share on other sites

Hi everyone!

 

I'm new here, so I hope it's the right place to ask my question.

 

When I import my Spriter project folder into unity, I do get the animation I created, but when I try to use it in an animator, it says "bone_001: Rotation missing!", same thing for bones 002, 003 and 004. The only bone that I can actually see saved in the assets folder is bone000, which is the parent bone of all others. Anybody know what the problem is? Where are the bones that it's trying to access saved? I'm pretty clueless as to what to do.

 

Thanks in advance for any help, if I didn't provide enough information please let me know :)

Link to post
Share on other sites
  • 4 weeks later...

Hey there,

First off - love this package. It's a real lifesaver, thank you for taking the time to do this.

I have a question though, which I'm hoping you'll be able to help with.

I'm not too familiar with how Asset Processing / Importing scripts work within Unity, but we've been having trouble with Auto processing feature undoing any work we've done within Unity when passing the project across SVN.

Is it possible to disable the auto processing, and instead, tell it when we'd like it to process? The ability to have the Animations / Prefabs update as you create them in Spriter is wonderful and we'd rather not lose this functionality if possible.

If you have any insight, it would be greatly appreciated.

Thanks in advance,

Matt

Link to post
Share on other sites

As a matter of fact, that can be done. Quite easily too. Just look at the "SCMLProcessor" class and fiddle with it a little. Rename the method to something else, have some way to have the user target the .scml file (like Selection.SelectedObject (or something like that, idr the exact property)) and then create a menu item from it or something.

Link to post
Share on other sites
19 minutes ago, Dengar said:

As a matter of fact, that can be done. Quite easily too. Just look at the "SCMLProcessor" class and fiddle with it a little. Rename the method to something else, have some way to have the user target the .scml file (like Selection.SelectedObject (or something like that, idr the exact property)) and then create a menu item from it or something.

Hi Dengar, thanks for the response!

Yeah it was a case of posting before I'd actually taken a closer look at it (it was pretty late!). Managed to get it working with minimal effort. Thanks though!

 

For anyone else who may need it, just dump this in the ScmlPostProcessor class :

 

 [MenuItem("Spriter Utilities/Animation/Update Spriter Animation")]
        private static void Process()
        {
            var filesToProcess = new List<string>();
            filesToProcess.Add(AssetDatabase.GetAssetPath(Selection.activeObject));
            Debug.Log(AssetDatabase.GetAssetPath(Selection.activeObject));
            ProcessFiles(filesToProcess);
        }

 

All you gotta do is select the SCML file in the project view, and then up top next to the Window / Help tool bars, there'll be one called 'Spriter Utilities'. Follow that menu through and click it, and you're set!

 

If you want to stop the 'Auto Updating' of it when imported, comment out / change the name of the function called 'OnPostProcessAllAssets' towards the top of the same class.

Link to post
Share on other sites

I don't think it's a big secret that a lot of fixes for current bugs with the importer keep eluding me. The base functionality is there, but when you try to use more advanced Spriter features, chances of something going wrong increases.

So I took a look at SpriterDotNet and started working on a little alternative by just adding a dash of Mecanim to it.

Here's what I've been able to achieve thus far.

Not sure how much of Mecanim I'm able to implement this way, but I'll keep exploring some new options. I am unsure whether this will completely replace Spriter2Unity, but it might become an appealing alternative.

Link to post
Share on other sites

Okay as a little update. I had all this neat stuff prepared, but now my iCloud Drive is malfunctioning something bad.

I still haven't managed to fix it, but I managed to salvage most of the project and moved it to my dropbox.

So anyway, since the project is still in its developmental stage, I'm just going to drop this here.

https://github.com/Dharengo/SpriterDotNetMecanim

It's very bare bones. The only thing it currently does is create the AnimatorController, and as of yet the AnimatorController has limited functionality. That being said, I'd appreciate it if some people felt like taking it for a spin and tell me what sort of features they feel like they're missing. I can go further from there.

Link to post
Share on other sites
  • 2 weeks later...

I seem to be having an issue getting my spriter project into my unity project.

I was following the instructions at the front of this form thread, I downloaded the unity package from the first page of the thread, and when I put my spriter project file into the unity project Unity seems to try to import the assets indefinitely.

 

The "Hold On" progress bar shows up, and every single time it is about to get to the end, it jumps back a little bit and never finishes importing.

 

Anybody know what is going on?

Spriter Error.png

Link to post
Share on other sites

Good day everyone! :-D

 

I was told that I can get help here. I having issues importing Spriter Pro Project to Unity. Initially, I was following thru this youtube tutorial Spriter2Unity Importing Spriter Animations to Unity. I can't drag n drop file to my version of Unity(5.3.3f1 (64-bit)). So, I import the Unity package and PlatformerPack, manually. I can't import PlatformerPack using Unity, so, I close Unity and add the folder under Assets folder of my Unity project. When I open the project, a "Hold On" Panel popup and appears to be importing PlatformerPack contents to Unity but its stuck there for more than an hour. I can't get pass to that part. Am I doing something wrong? Is there a way to get around this and run the project without too much of a hassle importing Spriter Pro projects?

 

edit;

looks like Tekuzo had same problem 

Link to post
Share on other sites
  • 2 weeks later...

Hi

I have problem when i try to rotate my animation in unity (when i try to flip over my character to 180 degrees so that he faces other direction) it just disappears and only a forearm is visible and that forarm is the most infront of the Z order. I use spriter essential and the latest unity and downloaded the Spriter2unitydx. Anyone that has the same issue here?

Link to post
Share on other sites
19 minutes ago, Gymzen said:

Hi

I have problem when i try to rotate my animation in unity (when i try to flip over my character to 180 degrees so that he faces other direction) it just disappears and only a forearm is visible and that forarm is the most infront of the Z order. I use spriter essential and the latest unity and downloaded the Spriter2unitydx. Anyone that has the same issue here?

/**
*  Flip the player horizontaly
**/
public void FlipHorizontaly ()
{
	// Switch the way the player is labelled as facing.
	facingRight = !facingRight;

	// Multiply the player's x local scale by -1.
	Vector3 theScale = transform.localScale;
	theScale.x *= -1;
	transform.localScale = theScale;
}

There you go :)

Link to post
Share on other sites
1 hour ago, Bisoux said:

/**
*  Flip the player horizontaly
**/
public void FlipHorizontaly ()
{
	// Switch the way the player is labelled as facing.
	facingRight = !facingRight;

	// Multiply the player's x local scale by -1.
	Vector3 theScale = transform.localScale;
	theScale.x *= -1;
	transform.localScale = theScale;
}

There you go :)

Thanks Bisoux i appreciate the help but the thing is that i am using the Input.GetAxis("Horizontal") to move him around. Any idea how i would implement your theory into that?

Link to post
Share on other sites

Sure. You could do it like this.

// Update is called once per frame
void Update ()
{
  float velocityX = Input.GetAxis ("Horizontal");
  if (velocityX >0 && !facingRight) {
    // ...  the player.
    FlipHorizontaly ();
  }
  // Otherwise if the input is moving the player left and the player is facing right...
  else {
    if (velocityX <0  && facingRight) {
      // ... FlipHorizontaly the player.
      FlipHorizontaly ();
    }
  }
}

 

Link to post
Share on other sites

Hi Dengar, There is any bug with bone link.

  • in "animation 1", i create 2 bones ("bone1" and "bone2") which not linked each other, and then i animate them, they are working properly in unity.
  • i clone the animation "animation 2", and link the "bone2" to "bone1" and create new movement the "bone1", "bone2" move as well by "bone1" in spriter, but not in unity.

I'd appreciate if you fix this in the future
 

However, this tool is very helpful.

Thank you.

Link to post
Share on other sites

Hi Dengar, There is any bug with bone link.

  • in "animation 1", i create 2 bones ("bone1" and "bone2") which not linked each other, and then i animate them, they are working properly in unity.
  • i clone the animation "animation 2", and link the "bone2" to "bone1" and create new movement the "bone1", "bone2" move as well by "bone1" in spriter, but not in unity.

I'd appreciate if you fix this in the future
 

However, this tool is very helpful.

Thank you.

Link to post
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...