atmuc Posted October 13, 2015 Report Share Posted October 13, 2015 can i use Spriter's triggers,variables and tags in unity with this importer? Quote Link to comment Share on other sites More sharing options...
Dengar Posted October 14, 2015 Author Report Share Posted October 14, 2015 I'm sorry to break it to you but these things are already mentioned in the opening post as well as the tool's description on Github. The only people working on the importer are like the one guy who does it as a hobby (me) and the occasional idea contributor. Quote Link to comment Share on other sites More sharing options...
atmuc Posted October 14, 2015 Report Share Posted October 14, 2015 Hi Dengar, was your last post for me? Quote Link to comment Share on other sites More sharing options...
Dengar Posted October 14, 2015 Author Report Share Posted October 14, 2015 Oh wait, it was a query, sorry I misread you:As has been said on the first page, these things are currently not implemented, and it is unlikely they will be any time soon. Quote Link to comment Share on other sites More sharing options...
alex31016 Posted October 23, 2015 Report Share Posted October 23, 2015 Hello, I am getting the next error. I'm using Unity 5.1.3f and also tried Unity 5.2.0f3 Unable to build a prefab for 'test'. Reason: System.NullReferenceException: Object reference not set to an instance of an object at Spriter2UnityDX.Prefabs.PrefabBuilder.TryBuild (Spriter2UnityDX.Importing.Entity entity, UnityEngine.GameObject prefab, UnityEngine.GameObject instance, System.String directory, System.String prefabPath, IDictionary`2 folders) [0x0013a] in C:\Users\Alex\Documents\New Unity Project 15\Assets\Spriter2UnityDX\Editor\PrefabBuilder.cs:85 at Spriter2UnityDX.Prefabs.PrefabBuilder.Build (Spriter2UnityDX.Importing.ScmlObject obj, System.String scmlPath) [0x0014e] in C:\Users\Alex\Documents\New Unity Project 15\Assets\Spriter2UnityDX\Editor\PrefabBuilder.cs:50UnityEngine.Debug:LogErrorFormat(String, Object[])Spriter2UnityDX.Prefabs.PrefabBuilder:Build(ScmlObject, String) (at Assets/Spriter2UnityDX/Editor/PrefabBuilder.cs:54)Spriter2UnityDX.PostProcessing.ScmlPostProcessor:ProcessFiles(IList`1) (at Assets/Spriter2UnityDX/Editor/ScmlPostProcessor.cs:40)Spriter2UnityDX.PostProcessing.ScmlPostProcessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/Spriter2UnityDX/Editor/ScmlPostProcessor.cs:32)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[])UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)UnityEditor.DockArea:OnGUI() Thanks in advance Alex Quote Link to comment Share on other sites More sharing options...
Dengar Posted October 24, 2015 Author Report Share Posted October 24, 2015 Have you tried it with a different .scml file? Like maybe one of the example ones? Quote Link to comment Share on other sites More sharing options...
alex31016 Posted October 25, 2015 Report Share Posted October 25, 2015 Thank you @Dengar, looks like works fine with the "Gray Guy" example. So it looks like we have some issue with our spriter project. We noticed that the skins are not working... maybe the error have a relation with the skins? Quote Link to comment Share on other sites More sharing options...
Dengar Posted October 26, 2015 Author Report Share Posted October 26, 2015 By skins, do you mean charactermap, or the "skinning" feature? (the first one is not yet implemented, the second one I believe is completely impossible) Quote Link to comment Share on other sites More sharing options...
Pixelpoint Posted November 6, 2015 Report Share Posted November 6, 2015 Good day all! I have this small issue with Spriter2Unity (PS: it's not your fault! It's darn unity's fault). I have animated all of my animations now and imported it successfully into Unity. All works well, EXCEPT one small thing: The animation will be slightly changed in Unity: Look at this example (from my project): http://imgur.com/eVbkWxB Seems like Unity is trying to "simulate physics" or something. Tried to fiddle around with the animation curve-tangents inside Unity, but I can't get the animations to look exaclty like it does in Spriter. The ONLY work-around I have found so far is: 1. Find all the parts where the animation doesn't look good inside Unity 2. Go back to Spriter, find the same part in the timeline 3. Spam "key all" button over that part, thus there are soo many keyframes in the animation that Unity can't get the chance to slerp/simulate physics/do random crap I think the problem inside Unity is maybe that all of the keyframe tangents are set to Free Smooth instead of Linear (or something like that). If anyone (especially you Dengar) have any advice for me, that would be great. As my work-around is very bad if I should decide to go and change parts of the animation (a lot of keyframes to change!) EDIT: even with 100 extra keyframes each 5th millisecond gives some weird artifacts in Unity. It looks better though Quote Link to comment Share on other sites More sharing options...
Pixelpoint Posted November 6, 2015 Report Share Posted November 6, 2015 Maybe an possible fix for this (so the animation will be identical to how it is in Spriter): The unity importer script can add keyframes on the entire timeline for that animation inside Unity? Might be hard to do I guess Quote Link to comment Share on other sites More sharing options...
Mike at BrashMonkey Posted November 6, 2015 Report Share Posted November 6, 2015 6 hours ago, Pixelpoint said: Maybe an possible fix for this (so the animation will be identical to how it is in Spriter): The unity importer script can add keyframes on the entire timeline for that animation inside Unity? Might be hard to do I guess This could be done manually in Spriter, using the key all button and setting snapping intervals on the timeline, turning snapping on and using Control+2 to move ahead in the animation timeline at set intervals, then clicking the key all to make the keys...after that point, if you change all keys to instant or maybe linear mode (also must be done manually per key-frame, sorry) then your animation should be able to play back fine, IF the problem is the unsupported curve type. All this aside, if the problem is custom curves and you need to use them, might want to look into Loodawrawa's plugin It also looks like it might be fixed by adjusting the animation controller setup in Unity, which could be blending back to the original pose. Cheers. Quote Link to comment Share on other sites More sharing options...
Dengar Posted November 7, 2015 Author Report Share Posted November 7, 2015 16 hours ago, Pixelpoint said: Good day all! I have this small issue with Spriter2Unity (PS: it's not your fault! It's darn unity's fault). I have animated all of my animations now and imported it successfully into Unity. All works well, EXCEPT one small thing: The animation will be slightly changed in Unity: Look at this example (from my project): http://imgur.com/eVbkWxB Seems like Unity is trying to "simulate physics" or something. Tried to fiddle around with the animation curve-tangents inside Unity, but I can't get the animations to look exaclty like it does in Spriter. The ONLY work-around I have found so far is: 1. Find all the parts where the animation doesn't look good inside Unity 2. Go back to Spriter, find the same part in the timeline 3. Spam "key all" button over that part, thus there are soo many keyframes in the animation that Unity can't get the chance to slerp/simulate physics/do random crap I think the problem inside Unity is maybe that all of the keyframe tangents are set to Free Smooth instead of Linear (or something like that). If anyone (especially you Dengar) have any advice for me, that would be great. As my work-around is very bad if I should decide to go and change parts of the animation (a lot of keyframes to change!) EDIT: even with 100 extra keyframes each 5th millisecond gives some weird artifacts in Unity. It looks better though This has something to do with the way Unity interpolates to form a tween. I'm not exactly sure what I can do about it. I have this distinct feeling that there is something I can do thoug. Quote Link to comment Share on other sites More sharing options...
DarkSlash Posted November 24, 2015 Report Share Posted November 24, 2015 Does it have 2D Toolkit support? Quote Link to comment Share on other sites More sharing options...
jjmm Posted November 28, 2015 Report Share Posted November 28, 2015 Hello, Recently been having some issues with Spriter animations looking different in Unity. Different keyframes and different curves. The curves are set to linear in Spriter but in Unity they are not linear. Maybe I'm doing something wrong in Spriter/Unity? Video of issue: https://youtu.be/KEPUV1w_crc https://youtu.be/S6Te08rdcEk Wondering if this is a known issue and if there's any workarounds? I've tried the new beta build but still getting the same issue. Using: Spriter2UnityDX.unitypackage SpriterDotNet.Unity.unitypackage Unity version 5.2.2f1 Spriter Pro - Steam version Spriter beta - Windows Quote Link to comment Share on other sites More sharing options...
Dengar Posted November 29, 2015 Author Report Share Posted November 29, 2015 Alas, this is where my expertise with Unity's mecanim system ends. I was hoping someone else would get interested in helping out with this aspect by now. This is in fact a known issue, and I do have a feeling there's some kind of fix for it, but at this point in time, I wouldn't know about that. Quote Link to comment Share on other sites More sharing options...
Bisoux Posted December 18, 2015 Report Share Posted December 18, 2015 Hi guys, I'm using SpriterToUnity and it works perfectly. I just have a question. Everytime you import in Unity it creates a .prefab with all animation clips inside. Is there a way to extract those animations or to get them separately from the .prefab? Thanks. Quote Link to comment Share on other sites More sharing options...
Dengar Posted December 19, 2015 Author Report Share Posted December 19, 2015 Edit > Project Settings > Spriter2UnityDX Quote Link to comment Share on other sites More sharing options...
Bisoux Posted December 19, 2015 Report Share Posted December 19, 2015 Ok thanks. I didn't have this option for some reason. I tried importing the package but it didn't work either. Then I tried installing the archive from github and it works fine now. Might be something weird with the unity package. Quote Link to comment Share on other sites More sharing options...
Dengar Posted December 20, 2015 Author Report Share Posted December 20, 2015 Or maybe I forgot to update the package? Or maybe I consciously decided not to update the package? I don't remember, it's literally the very last update I made and it's a while ago. Quote Link to comment Share on other sites More sharing options...
boorch Posted December 29, 2015 Report Share Posted December 29, 2015 guys i'm experiencing a strange bug: if i import another asset before Spriter2UnityDX, importing a spriter project to Unity gets stuck on an endless loop towards the end. the only times i succesfully import spriter projects are when the Spriter2UnityDX is first (and the only) asset i imported to my project. mike told me this "infinite loop" problem was discussed before but i can't seem to find it. so anyone stumbled upon this bug before? Quote Link to comment Share on other sites More sharing options...
Dengar Posted December 29, 2015 Author Report Share Posted December 29, 2015 For the zillionth time, then: I don't know why it happens. I just know it doesn't happen if you manually import the files as Sprite. The biggest problem with bugs and fixing them is that you actually have to be able to reproduce the problem to understand what's causing it. Quote Link to comment Share on other sites More sharing options...
mySprite Posted December 30, 2015 Report Share Posted December 30, 2015 Just to follow-up for brand new users, like me, who are running into the "infinite loop" issue when importing a Spriter project into Unity 5.x. I ran into the issue from the start, even when following the video posted by BrashMonkey on how to use the importer. The following steps will CREATE the error in Unity 5.2 or 5.3 when using Spriter r5 (via Steam): 1a) Double-click the Spriter-to-Unity package and select a project, or... 1b) Open Unity, select a project, then Import the package, or... 1c) Open Unity, create a New project, then Import the package, then... 2a) Drag-and-drop a Spriter project folder into the Assets panel in Unity, or... 2b) Copy-and-paste or move a Spriter project folder into the appropriate Assets folder via Windows Explorer. 3) Your Unity 5.2.x or 5.3.x project will begin to automatically import the Spriter project, but never complete. It will either appear to reset and attempt to re-import all the sprites over-and-over, or if the project has a single sprite, it will appear stuck at the end of the process and never finish. To work-around the issue, follow Dengar's point about "manually import the files as Sprite": 1) Perforrm step 1a-c as above. 2) Once the Spriter-to-Unity package appears in your Assets folder in Unity, drag-and-drop or copy the individual sprite images (your .png files) into the Assets panel in Unity. DO NOT simply drag the whole Spriter folder over. Just bring in all the images. 3) Check each image that appears in Unity via the Inspector - each image should be set to Sprite (2D and UI). Click Apply for each image you need to change. For example, if your images came in as Texture Type: Advanced or Texture, you need to change it to Sprite and hit Apply. If you don't hit Apply, it won't re-import the image, so make sure you've done that for EVERY sprite in your Spriter project. 4) Save your project, just in case. 5) In Windows Explorer, go to your Spriter project and drag-and-drop the .scml file into Unity's Asset panel. 6) After a brief amount of processing, you should see that each Sprite now has an accompanying GameObject (e.g. entity_000) with an Animator that contains every animation you made in Spriter. You can drag these objects into your Scene and they will play the default animation when you Play the game. Set up the Animator as normal, to swap animations. Hope this helps, M Quote Link to comment Share on other sites More sharing options...
Pixelpoint Posted December 31, 2015 Report Share Posted December 31, 2015 I can verify the findings of user @mySprite. If an image is set to anything else than the "Sprite" format in importing options, this will cause the infinite-loop when importing Spriter projects. HOWEVER! I made this small script, so that all the images I import to unity from now on is set to the "Sprite" format! using UnityEngine; using UnityEditor; public class TexturePostProcessor : AssetPostprocessor { void OnPreprocessTexture() { Object asset = AssetDatabase.LoadAssetAtPath(assetPath, typeof(Texture2D)); if (asset) return; TextureImporter importer = assetImporter as TextureImporter; //Settings that will be applied to the image importer.textureType = TextureImporterType.Sprite; importer.filterMode = FilterMode.Point; importer.textureFormat = TextureImporterFormat.AutomaticTruecolor; } } mySprite 1 Quote Link to comment Share on other sites More sharing options...
Dengar Posted December 31, 2015 Author Report Share Posted December 31, 2015 Hm.... Interesting. There's a number of issues I have with that, so I most definitely won't include it in the main build, but it's a "quick fix" that other people can use until I find out what goes wrong with my own AssetPostProcessor. Quote Link to comment Share on other sites More sharing options...
Rnd Posted January 4, 2016 Report Share Posted January 4, 2016 Im using Unity 5.3.1 and spriter2unityDX when Im importing gregGuy animation jumpStart the bone seems not connected and animation gone wild Am i doing it wrong ?? 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.