Jump to content

Spriter for Unity 5.0


Dengar
 Share

Recommended Posts

  Hi everyone, i bought Spriter recently but im having trouble with the package in Unity, when i import the package it gives me this 4 errors.

 

 

AnimationBuilder.cs(93,42): error CS0122: `UnityEditor.AnimationUtility.SetAnimationClipSettings(UnityEngine.AnimationClip, UnityEditor.AnimationClipSettings)' is inaccessible due to its protection level
 
AnimationBuilder.cs(103,64): error CS1061: Type `UnityEditor.Animations.AnimatorController' does not contain a definition for `animationClips' and no extension method `animationClips' of type `UnityEditor.Animations.AnimatorController' could be found (are you missing a using directive or an assembly reference?)
 
AnimationBuilder.cs(103,43): error CS1502: The best overloaded method match for `UnityEditor.ArrayUtility.Contains<UnityEngine.AnimationClip>(UnityEngine.AnimationClip[], UnityEngine.AnimationClip)' has some invalid arguments
 
AnimationBuilder.cs(103,43): error CS1503: Argument `#1' cannot convert `object' expression to type `UnityEngine.AnimationClip[]'
 
I dont know much about code, so it would be awesome if someone can help me with this, btw i have the Unity 5.0.0b1 version.
 
Thanks!

 

Link to comment
Share on other sites

Hi AlexYeaaa,

 

There's a newer build of Unity. You might want to update and see if that helps. Also, are you using the latest build of Spriter2Unity? Are there any specific Spriter features you might be using that Spriter2Unity does not support, like Skins, the more advanced speed curves, animations within animations?

 

Also, are you following the steps like in the video I'm about to post below?

 

cheers.

 

-Mike at BrashMonkey

Link to comment
Share on other sites

Hi SauloDaniel,

 

I was able to reproduce a similar problem by editing the pivot point of Sprites in the canvas.  I don't think this is supported yet by Spriter2Unity.  Instead, double-click the images in the file palette to set their "default pivot point" which will be universal throughout the project.  Remember not to change the pivot point in the canvas.

 

Cheers.
-Mike at BrashMonkey

 

Hello, I'm having a problem with the plugin, when you step design for Unity parts are getting displaced. An example of this can be seen in the images below:

 

124k6cz.png

 

24bul1l.png

Link to comment
Share on other sites

Hello again everyone.  I'm trying to get together a list of the features that are not yet support to help people avoid issues while importing Spriter projects.

 

So far it seems like:

 

1) pivot points edited on canvas instead of "default pivot points" (edited in the image files in the file palette) are not supported and therefor cause images to be misaligned once imported. (This is fairly easily avoided for most animation needs by only setting the default pivot point in your image files before dragging them onto the canvas)

 

2) Spriter files with multiple entities? (maybe I just don't know what I'm doing in this case, but when I imported the explosions scml from the Essentials Game Effects pack this got confusing for me.)

 

3) Skin mode sprites (the placeholder and unsupported feature which will be replaced in the future with a totally redone version)

 

4) Animations within animations (sub-entities)

 

Can anyone else report specific features that are not supported and therefore should currently be avoided?

 

Thanks.

-Mike at BrashMonkey

Link to comment
Share on other sites

It likely is working and I don't know what I'm doing. I need to learn how to pick starting animations and trigger animation changes in imported Spriter projects. That's likely the next video I'll make once I know what I'm doing in that regard.

 

Cheers.

-Mike at BrashMonkey

 

 

2) should work. Not sure why it doesn't. It should create a separate prefab for each Entity.

 

The other ones I will add to the initial post just so anyone reading it knows it's not (yet) supported.

Link to comment
Share on other sites

It likely is working and I don't know what I'm doing. I need to learn how to pick starting animations and trigger animation changes in imported Spriter projects. That's likely the next video I'll make once I know what I'm doing in that regard.

 

This has some overlap with Unity's standard tutorials. I suggest you watch a few of those.

 

http://unity3d.com/learn/tutorials/modules/beginner/animation/animator-controlleris the most important one. It's the same for 3D as it is in 2D.

 

http://unity3d.com/learn/tutorials/modules/beginner/animationremaining animation tutorials

 

You should be able to learn all the basics for your own videos.

Link to comment
Share on other sites

Really, REALLY? Dang. If I had known this sooner I would have fixed it long ago. Thanks for the heads up though. Next time you find out something like this, let me know, or create a pull request. I'll add it to the next update regardless.

 

I still can't believe I made a basic mistake like that and had it go unnoticed for weeks.

 

 

 

How long have you known this? Because I would like to have known about it as well. Can't really fix things if I don't know they need fixing.

 

hmm. Well the first problem was the infinite loop. We had the same problem as other newbs made in the earlier version of SpriterUnity not DX. Make sure your images are set to Sprites not Textures. With DX there was a better natural flow to it all. Are first import worked fine(images were already set to Sprites). We only noticed the loop occur after a new Spriter image update came in with 2 new pieces of art. We down prioritized the issue for about a week as our project had more important matters to attend to. But then we had a show and tell and we needed to get these resolved. So after spending time inserting debug logs I finally remembered non DX version had to have them images set to sprites having watched where the loop started. The artist informed me there were new sprites. So I checked out the sprites and found they were set to advanced. Now since they are advanced they showed up in game world no problem, but then I switched them to sprite and problem fixed. No more inifinite import loop.

 

We found this 1 week prior to my fix post for Valaar.

 

 

 

As for the ordering issue. Same situation. We just had another presentation coming up. So I observed the sorting order after turning on the forced sorting. When the scene loaded the sorting was fine. Even going through every Sprite Renderer all the index was fine. Only after moving did the sorting order go funny. I couldn't find out why. So I went through the code stuck debug logs in. Eventually I found the * 1000 to bump the zposition into usuable integer values. So I checked what was happening to my movement in the game world. Although we only move on X/Y, we are using Spline Pro for movement. Even though those are still z.0. I was getting movement along the z axis. Some was larger, some was smaller. So when the z axis at a point was too small. The *1000 division was just to minimal for the system. Followed the code and found the that the math was working on world.z, rather than local.z. Changed to local z, and boom I was crying with tears of happyness. Considering are artist did over a month of animation using Spriter, and our dead line 1.5 weeks from now. Not having Spriter would have been a major hit to our work.

 

As for time line. I was sitting on this fix about 2 days prior to posting to Valaar's problems. 

 

I have been to this thread regularly to see if anyone was posting fixes. but I was in a bind. Either fix the problem myself by spending a couple of days, or losing a month of work and cut everything that used spriter. I figure 2 days of working hunting down these issues was worth the effort. Fortunately it only took part of the day.

 

 

So. may seem like I have been sitting on this problem for a weeks, but really only a matter of days. Glad I could help. Spriter is awesome and the Spriter2UnityDX has really helped my project. We still have the occasional non bone image not in the right spot. but when out spriter guy attaches a bone to the image. The spriter objects tend to work better. So it's a working work around for us. So we aren't going to be investing a code fix for this.

Link to comment
Share on other sites

Hi! First of all, thanks for this, got me to playing around with Spriter again :). 

 

It's been working great mostly, but should the dynamic reparenting feature be working? Tried to search for it, not sure if it's a pro feature or not. I tried to do an animation where the character grabs his hat and waves it. It works in Spriter, but in Unity not so much. The arm moves correctly, but the hat seems to just scale on y axis and swirls around.

 

I can work around it though, just asking and to let you know.

Link to comment
Share on other sites

Hi, thanks for working on this c:

I've had an issue where new bones can't be created during animation. I have a bone that represents a hitbox, for example, and I don't want it on all frames. In the old version, it would enable/disable the object if it was/wasn't in the current frame. Not sure if this was intended, but it was very useful seeing as hitboxes/events werent implemented. Also, the "hitbox bone" is in the hierarchy, it's just not being enabled/disabled as before; it's always disabled.

Link to comment
Share on other sites

@jayderu Regardless, thanks for the heads up. I still think it's a strange issue, and I wonder what's causing it. DX should automatically set the import settings for you no matter what they are. I er, will try to take a look at it after the minor fixes & updates.

 

@Huoh I've never even thought of people doing dynamic reparenting. As of this point in time it's not a supported feature. I'll make a note of it in the opening post and will maybe see if such a feature can be implemented in the future.

 

@GenericGameDev I'm not quite sure what's up with that. It's probably some minor kink in the code somewhere that is causing it to happen. I'll add it to the things to fix next update.

Link to comment
Share on other sites

  • 2 weeks later...

Are transition types implemented? It looks like it ignores curve types. For example, trying to implement a quick an instant change from one position to another, but Unity will always smooth the curve between the two.

 

I am working on modifying the importer for it, but was wondering if I am just doing something wrong.

Link to comment
Share on other sites

Are transition types implemented? It looks like it ignores curve types. For example, trying to implement a quick an instant change from one position to another, but Unity will always smooth the curve between the two.

I am working on modifying the importer for it, but was wondering if I am just doing something wrong.

No you're not wrong that's currently how it works although most of the time I like how things get smoothed on import

Link to comment
Share on other sites

Hello Guys, I have a question which I can't get my head around ...

 

I'm trying to use Spriter together with TexturePacker. I tried some alternatives:

 

1. Following the tutorial to make these 2 softwares together (www.youtube.com/watch?v=IVVnby8OeDo). I could get the png and json exported, but when imported into Unity, the images don't get cut into single sprites, and the PrefabBuilder errors out.

 

2. I created the spritesheet in TexturePacker, and imported it into unity (gets cut up into single spritesheets). I then tried to modify the PrefabBuilder.cs to allow these kind of files, without success.

 

Did anyone find a way to solve this issue? 

 

I would appreciate any help!

Link to comment
Share on other sites

Are transition types implemented? It looks like it ignores curve types. For example, trying to implement a quick an instant change from one position to another, but Unity will always smooth the curve between the two.

 

I am working on modifying the importer for it, but was wondering if I am just doing something wrong.

 

Do you mean transitioning between different animations? Because you have to create animation transitions manually anyways. If you want to make them instant you have to edit the transitions yourself to be instant.

 

Otherwise I'm not sure what you mean. Do you mean like the location of a body part "snapping" to a different location instantly? Can you please elaborate?

 

Hello Guys, I have a question which I can't get my head around ...

 

I'm trying to use Spriter together with TexturePacker. I tried some alternatives:

 

1. Following the tutorial to make these 2 softwares together (www.youtube.com/watch?v=IVVnby8OeDo). I could get the png and json exported, but when imported into Unity, the images don't get cut into single sprites, and the PrefabBuilder errors out.

 

2. I created the spritesheet in TexturePacker, and imported it into unity (gets cut up into single spritesheets). I then tried to modify the PrefabBuilder.cs to allow these kind of files, without success.

 

Did anyone find a way to solve this issue? 

 

I would appreciate any help!

 

Creating a Spriter Entity in Unity from an atlas is a completely different process that I haven't examined fully, but it's more complicated than doing it the normal way. So to implement that it would require a separate block of code.

It's not very high on the priority list to implement anyway because there's a very easy way to deal with this:

 

-In Spriter, use separate textures for each part.

-In Unity, use the internal Sprite Packer feature to auto-generate an atlas.

 

Although I might implement a small feature that automatically creates a packing tag so you don't have to do it manually. You'd still have to generate the atlas, but you won't have to tag them anymore.

Link to comment
Share on other sites

Do you mean transitioning between different animations? Because you have to create animation transitions manually anyways. If you want to make them instant you have to edit the transitions yourself to be instant.

 

Otherwise I'm not sure what you mean. Do you mean like the location of a body part "snapping" to a different location instantly? Can you please elaborate?

 

 

Yeah, the 'snapping' is what I mean. Not transitions between animations, but between keyframes of a single animation. For example, having the arm of my character snap instantly from one location to another, rather than smoothly animating between. This works if I manually edit the animation curve to be constant. Spriter also does it with the 'Instant' transition type.

However, it doesn't look like the importer preserves the transition type, and will always result in smooth transitions.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Ad.Dany,

This might mean you're using a Spriter feature that Spriter2Unity does not yet support (can not convert over to the native Unity animation format). Are you using any of Spriter's more advanced or experimental/unfinished features like Skin mode, sub-entities or custom speed curves?

 

thanks.
-Mike at BrashMonkey

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.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...