Jump to content
Dengar

Spriter for Unity 5.0

Recommended Posts

Folder structure should be completely irrelevant. The packing tag is all that matters.

Also, the spriter file isn't included in the build so it's irrelevant.

Bones have no sprites. They are also irrelevant.

The fact of the matter is, if there's so many draw calls then something's not packed correctly. Or maybe not packed at all.

Share this post


Link to post
Share on other sites

Oh, I didn't realize that you can (and should?) pack all the sprites with one tag, not separately.
When I packed the second character with same tag ( hero & hero not hero & enemy) the problem was resolved:
1 setPass call for both of the characters.

Thank you for your patience & for the great plugin.

Share this post


Link to post
Share on other sites

Hey Dengar, many thanks for your work on this.

I've been bumping into an issue where anytime I have a sprite swap (usually for facial expressions but sometimes for hand holds) the z-value for the spriterenderer transform changes causing my hero to not be sorted correctly (e.g. the swapped face is behind the head). I've tried enabling "Apply Spriter Z Order" on the EntityRenderer and it still is not working properly.

I've experimented with changing the sprite swap keyframes to instant transitions instead of linear. 

Would having completely different z-orders in the animation that is having an issue cause this to happen? Any recommendations on what I could do to fix this either code side or asset side?

Thanks,

James

Share this post


Link to post
Share on other sites

Thanks for the quick reply.

I was able to fix the issue by making sure each animation had the identical z-order for all sprites as the first listed animation and then also making sure that all of the sprites were present in each animation (even when they are not visible). 

Cheers,

James

Share this post


Link to post
Share on other sites

Well, the problem is in the scripts that the importer attaches to the prefabs. Like I said, the script can make invisible things visible, and visibile things invisible, but it seems to forget to do so for things that start out invisible.

Share this post


Link to post
Share on other sites

Hi Dengar. I am new to using your spriter2unitydx . at start, the package is running well and the animations are perfectly imported but when few days passed, the prefab of my animations are not a prefab now instead it became a file. How to fix that bug? Everytime i will open my unity project this error always show up :


GetApplication().MayUpdate()
UnityEditor.AssetDatabase:SaveAssets()
Spriter2UnityDX.PostProcessing.ScmlPostProcessor:ProcessFiles(IList`1) (at Assets/Spriter2UnityDX/Editor/ScmlPostProcessor.cs:43)
Spriter2UnityDX.PostProcessing.ScmlPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Spriter2UnityDX/Editor/ScmlPostProcessor.cs:32)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

I am using unity 5.0

I hope you can solve this problem . because i really need your spriter2unitydx in my unity game. 

Thank you in advance.

Share this post


Link to post
Share on other sites

@skerriganBEST Bug video I've EVER SEEN (and heard) in my life. Awesome. ha ha ha.

My best guess is you used per frame custom pivot points accidentally instead of default pivot points. To set your pivot points for images the way that Spriter2Unity can understand, I think you need default pivot points, which you set by double-clicking on the image in the files palette, then setting the pivot point in the special mode that pops up.

If you just clicked and dragged the red point representing the pivot-point for the image on the canvas, I think (but could be wrong) Spriter2Unity doesn't properly convert that data..causing the shift of each image you see once its converted.

this make sense?

cheers.

-Mike at BrashMonkey

 

 

Share this post


Link to post
Share on other sites

I think I have it working now, although I have real difficulty adding new items to the walk and getting them to keep their z-order in multiple keyframes. For instance I decided to add a sword and shield walk to the character and everytime I imported it I lost the sword's z-order. I ended up using Unity's sorting layer as a workaround.

 

 

 

Share this post


Link to post
Share on other sites

There is a feature in Spriter to copy z-order to all frames. It is a known but that when you paste a sprite to all frames it can mess up the z-order. That bug is being worked on, In the mean-time, fix the z-order in the initial frame afterwards, then choose edit/copy z-order to all frames.

Share this post


Link to post
Share on other sites

Anyone else get "IsFinite (m_CachedRange.first) && IsFinite (m_CachedRange.second)"?

It's such a vague error and I'm having the worst time trying to get rid of it. It doesn't actually seem to affect the game in any way, but I can't stand having it pop up.

I think it is related to animations and the only animations I have in my game are from Spriter, but I'm not sure if this script is directly the problem. Perhaps it's a problem with bones without any sprites attached? I really don't have a clue except that it is animation/mecanim related.

 

EDIT: Ironically after so long trying to fix it, a few minutes after I posted for help online, I found the solution. The error is caused by animations that have no keyframes. My idle animation was like this so I clicked "Add Property" and added a position property.

Share this post


Link to post
Share on other sites

Hello,

We recently started making a game and we purchased some assets to speed up the development, however we get this strange issue with about 25% of the characters we have imported.

As you can see in the image the attack animation shows up correctly in spriter on the left but incorrectly on the right, for the Idle animation is does show up correct in both.

I already tried removing the pivots from frames, but as we did not make or animation these files I am not sure what else we can do to solve this.

Any thoughts as to what we can do? 

I have also attached the Spriter scml file, we are using Unity 5.4.3.

goblin-1.scml

Problems.png

Share this post


Link to post
Share on other sites
1 hour ago, Mike at BrashMonkey said:

Perhaps the animations you purchase don't have default pivot points set for the image or something. I think there is something lit that that can  cause Animations to not import properly.

It looks like they are set, but I am pretty new to using spriter, I assumed the pivot's set in the top of the scml file were them, is this not the case?

This only happens with 7 of the 30 characters we are using from this one artist, so I was assuming (maybe) wrongly that they would all act the same.

Share this post


Link to post
Share on other sites
18 hours ago, Baraphor said:

It looks like they are set, but I am pretty new to using spriter, I assumed the pivot's set in the top of the scml file were them, is this not the case?

This only happens with 7 of the 30 characters we are using from this one artist, so I was assuming (maybe) wrongly that they would all act the same.

Perhaps there are images which are not assigned to a bone, or more than one image on a single bone. I think things like this can cause problems. I think you need to isolate what the difference is between the ones which work and the ones which do not work.

We'd be happy to look into it ourselves, however, you might want to ask the people who made the art packs for permission before sending them in full or in part to us so we can try and see the difference. Of course we would not redistribute the material and would delete it immediately after finding the issue.

 

cheers,
Mike at BrashMonkey

Share this post


Link to post
Share on other sites
2 hours ago, Mike at BrashMonkey said:

Perhaps there are images which are not assigned to a bone, or more than one image on a single bone. I think things like this can cause problems. I think you need to isolate what the difference is between the ones which work and the ones which do not work.

We'd be happy to look into it ourselves, however, you might want to ask the people who made the art packs for permission before sending them in full or in part to us so we can try and see the difference. Of course we would not redistribute the material and would delete it immediately after finding the issue.

 

cheers,
Mike at BrashMonkey

There is definately two sprites attached to a single bone, I will see if that fixes things. However if it doesn't I will take you up on the offer to look into it, the license would cover us in this case.

Share this post


Link to post
Share on other sites

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.

Share this post


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