Jump to content

mySprite

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by mySprite

  1. Thank you @Pixelpoint! That script worked for me, perfectly. For my fellow non-coders, this is what I did: 1) Copy the script text from Pixelpoint's post above. 2) In Unity and with a SpriterPro enabled project (you added Dengar's Spriter package), create a new C# script (e.g. right-click your Assets folder > Create > C#Script 3) When the script appears in your Assets folder, note that the name is highlighted - replace the default NewBehavior text with "TexturePostProcessor" - spelling and capitalization matter. I then moved the script into the "Assets/Spriter2Unity/Editor" folder, since this is where other Unity editor-specific scripts go. 4) Double-click the script to open your script editor. 5) When the editor is open, remove the existing default script and paste the Pixelpoint script here. Save the script (Control-S). 6) Voila, now when you drag-and-drop folders or individual images into Unity, they automatically become Sprites. I confirmed this with my own projects and GreyGuy. @Rendi Kristyadi, I wasn't able to reproduce your particular error with GreyGuy in an existing project with other Spriter animations. Have you tried bringing the project into a blank project to see if your other content might be causing the problem? Or have you tried opening a clean (un-edited) version of "player.scml" into the project? Perhaps you accidentally modified the project in Spriter and that's causing Unity to bug-out. In my case, I made no changes to the GreyGuy folder and it worked fine. Using Unity 5.3.1. I see, after re-reading Rendi's post - the issue at hand wasn't about import, but the interpolation during animation, a problem mentioned elsewhere on this thread.
  2. 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
×
×
  • Create New...