Aprowolf Posted April 30, 2015 Report Share Posted April 30, 2015 UNLESS you are talking about the layer dropdown. I quickly ran a test and it appears it does not work quite the way I thought it would. Lemme quickly write a fix. thats what i am talking about :P Go rest Dengar , you are tired XD Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 1, 2015 Author Report Share Posted May 1, 2015 I went ahead and put my version in the opening post. Most of what you need to know is in there as well. At a later point I'll add some documentation on the new Script Components. Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 1, 2015 Report Share Posted May 1, 2015 Went and tried your new Version , Thx for resolving the Issue with the layers :) it fuctions well Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 1, 2015 Author Report Share Posted May 1, 2015 For now I think I'm gonna return to my own project. All the base features are worked out now. Should all be cool beans. I'll work on expanded features at a later time. Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 1, 2015 Report Share Posted May 1, 2015 Allrighty kool , wishing ya best of luck on your own project :) hopefully in next two weeks I'll be sharing a demo of my pwn project using The new DX converter ^^ Quote Link to comment Share on other sites More sharing options...
Xelnath Posted May 2, 2015 Report Share Posted May 2, 2015 My animations end up broken after converting to the new DX. Specifically, any sprite attached to the root is offset strangely. Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 3, 2015 Author Report Share Posted May 3, 2015 v1.0.1: Fixes: -Fixed an issue where the Z-order would get messed up if body parts were moved during animation Features: -Z-order can now be mutated by the animation Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 3, 2015 Report Share Posted May 3, 2015 I believe i'm always the first to test your updates :P ok here is the thing(serious bug affecting the importing process, I don't advice to upgrade to 1.0.1 immediately). when I try to import SCMLs using this package I get the error "Null Reference Exception : Object.refrence not set to instance of an object " at line 162 foreach (var key in keys) { //If it is present, enable the GameObject if it isn't already enabledvar mref = ArrayUtility.Find (key.objectRefs, x => x.timeline == timeLine.id);if (defaultZ == inf) {defaultZ = mref.z_index; //line 162positionChanged = true;} 4 of my SCML Projects suffers from the same Issue ,all of them had z values changing on them, I had to change back to version 1.0 to get them back working again Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 3, 2015 Author Report Share Posted May 3, 2015 Curiously, I tried it with your Green Monster and Dragon Bat, and I was able to import them just fine. That said, I fixed your issue anyway. I have a feeling what configuration would cause it to crash. Not upping the version number just for a hotfix to the new feature though. Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 3, 2015 Report Share Posted May 3, 2015 Green monster and dragon bat working fine on the new one :) just some projects refuses to be imported due to the mentioned error.I am the momment trying to re-assemble them in new SCML files and re-do the animations from scratch to see if that will solve this issue Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 3, 2015 Author Report Share Posted May 3, 2015 Nonono I just said, I fixed the issue. Errors shouldn't happen anymore. :P I already uploaded the fix. Basically, what happened, I assume, is this: Suppose you have an "effect" sprite, like one of those tornado things. That sprite isn't present in every animation. Now, suppose that while it's not present in EVERY animation, the Z value is different per animation. The importer would attempt to detect that the Z value changes, and attempt to access the sprite's Z value on the first frame of the first animation (to use as a control).... EXCEPT that sprite isn't present on the first frame of the first animation. So I just changed it so it accesses the sprite's actual first Z value. Not specifically the first frame of the first animation. Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 3, 2015 Report Share Posted May 3, 2015 looooool + Oh ok XD! for some reason i thought you were talking about solving diffrent issue :P I just downloaded the Package again now :P Ok it tottaly works now and the error is no more + Also yes the fix of the Z orders is aweasome ^^! Quote Link to comment Share on other sites More sharing options...
Wledig Posted May 3, 2015 Report Share Posted May 3, 2015 Damn, only a few months after I decide to implement 2DToolkit to Spriter2Unity, you decide to release your own implementation Dengar. xD For Sprite Swapping with 2DToolkit, I had gone for a similar approach to that of the SortingOrderUpdate script. I'll try and have a look at your implementation, see if I can make it work with 2DTK. PS: Keep up the good work, you're indeed a very kind community member. Quote Link to comment Share on other sites More sharing options...
dagondev Posted May 3, 2015 Report Share Posted May 3, 2015 Hi, so I downloaded today newest version. First removed old one then imported new one. Deleted sprites and scml and prefabs and imported in correct order and now I have this: Where it should be this: (this is from Spriter) What is happening? I am going out but when I get back I will check if with old version I happen to have same thing. Thanks for help. Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 3, 2015 Author Report Share Posted May 3, 2015 That's peculiar. I can't really tell what the problem is though. Maybe if you send me a sample I can check it out for myself and see what's up? Several different .scml files have been successfully converted to Unity, so there's probably something different about your .scml but I can't tell what without examining it. @Wledig: That's pretty cool, I tried my very best to make the code as easy to work with as I could. If it can be combined with 2DTK that would be pretty awesome. I don't know much about 2DTK myself but I heard some really good things about it. Quote Link to comment Share on other sites More sharing options...
Xelnath Posted May 3, 2015 Report Share Posted May 3, 2015 I think there's some sort of bug with the first sprite in the file being off-set weirdly. Not sure if its already been fixed though! This version is SO MUCH cleaner than the old. Great job, Dengarr! Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 4, 2015 Author Report Share Posted May 4, 2015 v1.0.2: Fixes: -Fixed an issue where sprites appeared distorted when resizing bones. -Exceptions are wrapped up nicely and no longer abort the whole process Features: -Now adds AnimationClips to existing AnimatorStates if they exist -Autosaves no longer trigger the importer Note that there is still some anomalous behaviour here and there. But the weird distortions should see about a 95% decrease. Special thanks to dagondev for helping me identify the issue, and Mike and Edgar for teaching me some things about Spriter to help me fix the issue. It's a bit of a shame that the tool is getting slightly slower with every update, but it's still within reason. I was able to import a project that has over 60 different AnimationClips in less than 20 seconds. I also have to add that most animation transitions work best if they are instant (IE no blend). Although it's really a case by case basis. But generally if the poses between two animations are radically different from one another, you want the transition to happen instantly. dagondev and lucid 2 Quote Link to comment Share on other sites More sharing options...
dagondev Posted May 5, 2015 Report Share Posted May 5, 2015 Thanks so much for help! Now my ugly project works in unity! I still had problem with head being next to legs, but I just needed to set pivot point on the sprite itself (via double clicking sprite in files section - on the right) and that did the trick. Quote Link to comment Share on other sites More sharing options...
Aprowolf Posted May 5, 2015 Report Share Posted May 5, 2015 Thanks for the update Dengar! checking it out right now btw is it ok if i send you some SCML projects that has some irregular behaviours from time to time for the sake of imporovment of the sprite importer? only if you are intersted Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 5, 2015 Author Report Share Posted May 5, 2015 I probably won't work on it right away, and I'm going to need to know exactly what I'm looking for, so I need an explanation. That said, any example of irregular behavior will help tons with improving the tool. Quote Link to comment Share on other sites More sharing options...
Dengar Posted May 5, 2015 Author Report Share Posted May 5, 2015 v1.0.3: Fixes: -Fixed an issue where flipped (negative-scaled) bones caused child sprites to appear out of place and in odd angles Features: -Added a toggle to the Entity Renderer that allows you to apply the .scml file's Z-index to the order-in-layer property of the Sprite Renderers -Removed Spriter2UnityDX components from the Add Component menu, since they are automatically added or removed About the toggle: The "Apply Spriter Z Order" toggle that now appears on the Entity Renderer adds a whole bunch of calculations to the mix, so for performance reasons it's better to leave it off. Not that it's a performance heavy operation. Just that every little bit makes a difference. Applying the Z order to the "order in layer" properties of the child sprites also introduces some overlap issues when multiple spriter entities overlap. These issues can be resolved by placing different entities on different layers, but that requires you to create more layers. However, it has come to my attention that sometimes, when a lot of stuff is happening on screen all at once, the sprite won't always render properly using just the position_z. In these cases, turning on Spriter Z Order on the Entity Renderer will likely fix the issue. Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted May 6, 2015 Report Share Posted May 6, 2015 Hi Dengar, A lot of people don't know about this feature, but Spriter actually supports the use of sprite-sheets (texture atlases) created from TexturePacker. I've created this example project in case there's a possibility that Unity could be made to support this Spriter feature:https://dl.dropboxusercontent.com/u/61721248/GreyGuyAtlas.zip Here is the example file. The animation uses the texture atlas (sprite sheet) and individual images. cheers,Mike at BrashMonkey Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted May 6, 2015 Report Share Posted May 6, 2015 Hi again Dengar, I changed the example file and replaced the link to fix the typo and update the file. If you already downloaded the original version, please redownload from the link above and replace what I originally had linked. Thanks,Mike (The previous example file caused bugs because it was using the texture atlas and original image files with the same names etc) Quote Link to comment Share on other sites More sharing options...
AniMittra Posted May 12, 2015 Report Share Posted May 12, 2015 If I switch to this version of Spirter2Unity, will it overwrite the prefab I had made from the old one? I want to try your solution since it's newer but I'm close to finishing my game and I don't want to break anything. Either way this seems really nice, and I'll try it with my next project either way. Quote Link to comment Share on other sites More sharing options...
esDotDev Posted May 12, 2015 Report Share Posted May 12, 2015 Looks like the importer is not currently respecting Origin points. After importing it looks like this: Rather than this in Spriter: Tried this with 3 different animations, and same result for all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.