Jump to content

Spriter for Unity 5.0


Dengar

Recommended Posts

6 minutes ago, rodut said:

Hi.

I have an issue.

When I'm importing my Spriter project into Unity the importer will loop endlessly.

Can someone explain to me what does this words means: "A workaround is manually setting your texture files to Sprite in the import settings." ??!?!?!?!?

Thanks in advance.

This means in Unity.  I think these links explain the general concept.
https://docs.unity3d.com/Manual/ImportSettings.html
https://docs.unity3d.com/Manual/class-TextureImporter.html

Link to comment
Share on other sites

  • 2 weeks later...

Mike, thanks.

Now I'm having problems with my death animation for the player.

I've made some animations, everything went well, except death animation.

You can check the video from Spriter and the video from Unity.

1. Spriter

When I reimport my *.scml file in Unity I get this animation...

2. Unity

 

Can someone help me solve this problem?

Thanks.

 

Link to comment
Share on other sites

Guys, thanks for your answers.

I have one more question.

I've made animations in Spriter for the same player. When I import them in Unity, the transition between animation idle/fire, jump/fire are good.

But the transition from walk/fire shows me in the same time the hands(2) of the player when he walks and the hands(2) when he fires, so I see 4 hands in the same time.

I've been trying couple of weeks to solve this problem, and I noticed that in my idle, jump, fire bones names are different from walk bones names.

Example: Idle/jump/fire - "head_001"; Walk - "head".

Can the problem be in different bones names for different animations?

Thanks.

 

Link to comment
Share on other sites

  • 3 weeks later...

Hello guys,

first I wanted to thank you for this awesome tool. We are currently using it for our semester project in university.
We have three different characters, the first and the second worked flawless after a few tries.. but we can't for the sake of god get the last one to work.
Therefor we are quite desperate and need some help from you pros!

The problem is one that was already mentioned a few times. Spriter shows everything perfectly but in Unity the position of the Sprites is messed up and some are even missing.
Pictures are worth a thousand words

And yes, I did set the default pivot points. ^^

The "Herkules" character works, but "Artemis" character does not.
Maybe somebody wants to have a go. (sorry for the part english, part german description) Here is a dropbox link with the files.

We would really really appreciate your help!

Greetings from Austria!

Link to comment
Share on other sites

  • 1 month later...
On 4/7/2015 at 9:28 AM, Dengar said:

(I don't have Spriter Pro myself though, and I know very little about this at this point in time)

I got mine with other additional programs and asset packs for $10 from a game dev bundle at humble bundle store. Maybe you could stay tuned so you can get a copy and make the new features.

Link to comment
Share on other sites

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

I seem to be having issues with sprites' z order when imported to Unity. Apply Sprite Z Order works - sometimes. I have to turn it on and off a few times and change the object's sorting layer and sometimes it works. Sometimes - not so much.

 

Is there a known issue with this? Or a way to get it to work more reliably? Or both?

Thanks,

 

Ori Pessach

Link to comment
Share on other sites

  • 3 weeks later...

Hallo, i use Spriter Pro in my 3D Game Project (Spriter2UnityDX). My Dialog System in unity3D start with the 2D animation (Spriter Pro) behind the textbox. The textbox is a UI and also there is the 2D animation (SpriterPro)

But in reality is this sprite not in the UI and when i move my camera stay the animation on X:0 Y:0 Z:0. The 2D animation (SpriterPro) is a 3D object, Is it possible to
make it to a UI object?

Link to comment
Share on other sites

  • 3 months later...

purchased spriter hoping to be able to use my animations in unity. the website says that i can but spriter offers no real api's only outdated user made ones that really makes me regret the purchase.. i spent many hours working on animations only to end up with broken prefabs on import into unity... the product should not be marketed as being able to import into unity if the feature is not actually supported by the software.. 

Link to comment
Share on other sites

  • 5 weeks later...

@Dengar Hey man, thanks for the awesome app. I actually used SpriterDotNet for a while up until about 6 months ago. The reason I switched to your app is because SpriterDotNet has a bug that causes the SpriterRenderers to constantly jump around between bones, making it impossible to switch out sprites during runtime in cases where your characters put on different clothes etc. And it also doesn't use the Unity animation features since it's not specifically designed for Unity.

Your app works amazingly well with the exception of the z orders being messed up. So I am trying to fix it, but I would appreciate it if you could point me in the right direction. What I did notice is that the z_index from the XML data is not correctly assigned when building the prefab. But I can't figure out why this happens.

Thanks in advance!

 

Link to comment
Share on other sites

@Dengar Okay thanks, but I may have found the bug. When the z_index is set the first time a sprite is loaded, the z_index never gets updated on different animations that also use that sprite even though it may have a different z_index. So a temporary fix (or permanent?) is to comment out the section in AnimationBuilder.cs where you check if z has changed. After doing that the z order works fine, but I'm guessing this will probably have some sort of cost to performance?

if (mref != null) 
				{
					if (defaultZ == inf) 
					{
						defaultZ = mref.z_index;
						positionChanged = true;
					}
					//if (!changedZ && mref.z_index != defaultZ) 
					//{
					//	changedZ = true;
					//	if (key.time > 0) kfsZ.Add (new Keyframe (0f, defaultZ, inf, inf));
					//}

					//if(changedZ)
					//{
						kfsZ.Add(new Keyframe(key.time, mref.z_index, inf, inf));
					//}

 

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

I haven't really worked on this project in ages. And to be honest, I don't intend to work on it in the near future either. It was just a little pet project to see the extent of my scripting abilities.

Also I have gotten a bit fed up with Unity. It just doesn't do the things I want it to in the way I want it to do them.

As I said before though, the code is out there for everyone to tinker with, I made it as understandable as I possibly could, and I'm willing to answer any questions I can. I still handle pull requests as well.

 

 

I think SpriterDotNet is fully featured though, including Character Maps. It requires a bit more programming than Spriter2Unity does, but if you're willing to learn how it works. I wrote a little addon for it too that allows you to use the Animator's state machines.

EDIT: I just realised Loodakrawa sent you here from SdN. I'm sorry I really couldn't be more help. While the basic features were easy enough to implement I just kept running into all kinds of glitches that are beyond my current skill level. Such things get frustrating after a while.

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I created a simple animation in Spriter and download the DX version to import it in to Unity. I followed the video on using this plug in. When I finally dragged my folder containing my sportier project no prefab or animation was created? When I had was an exact copy in Unity as I did in my folder on my hard drive?

What am I missing?

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