Jump to content

bonus2113

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by bonus2113

  1. Awesome, if you have any questions regarding the current code, feel free to ask, I know it's still a mess in some places.

    There actually used to be a CharacterMap component. This is the commit where I removed it: https://github.com/bonus2113/Spriter2Un ... dafdc2a09d

    The problem was that sprite animation was handled via animation events (and not via a regular animation curve). Animation events unfortunately don't get triggered while playing the animation in the editor and there were problems with transitions.

    I'll look into CharacterMap support after I'm back from vacation (1.5 weeks), but if you need it urgently you might want to start working on it yourself.

  2. I've decided to open a new thread for this implementation as the old thread is mighty out of date (especially the first page is misleading).

    Spriter2Unity

    Get it from GitHub: https://github.com/bonus2113/Spriter2Unity

    A tool that converts SCML files into unity .prefab and .anim files Based on the original work by Malhavok (https://github.com/Malhavok/Spriter2Unity)

    About

    What it does:


    • [*:o70kr28x]for each entity in SCML file creates a Unity prefab
      [*:o70kr28x]each entity got it's sprites assigned as long as you imported these sprites before conversion
      [*:o70kr28x]for each animation in SCML file creates a Unity animation under the prefab
      [*:o70kr28x]sprites are changed during animations, so only 1 SpriteRenderer is used for each node in the spriter file
      [*:o70kr28x]an AnimatorController is created (if it doesn't exist already)
      [*:o70kr28x]an Animator component is attached to the prefab. It gets a reference to the AnimatorController.

    Known issues:


    • [*:o70kr28x]Only quadratic, cubic, linear and instant curves are supported
      [*:o70kr28x]Mainline curves are not yet imported
      [*:o70kr28x]Only works with a "Pixels To Units" setting of 100
      [*:o70kr28x]Some animations throw errors when selecting/scrubbing through them in the editor. They work fine when running the game.

    Important missing features:


    • [*:o70kr28x]Sounds
      [*:o70kr28x]Points
      [*:o70kr28x]Boxes

    Usage

    Copy the contents of the Assets folder into your Unity project's Assets folder or import the package from here. Any SCML files copied into the project will be automatically processed. Prefabs are created in the same folder as the SCML file.

    Detailed:


    • [*:o70kr28x]Download this Unity package:
    https://github.com/bonus2113/Spriter2Un ... itypackage
    [*:o70kr28x]Open your Unity project.
    [*:o70kr28x]Import your whole Spriter project folder into Unity.
    [*:o70kr28x]With Unity open, go to the folder you saved the Unity package to and double click it.
    [*:o70kr28x]Unity should pop up with a dialog asking if you want to import the assets, click import on the bottom right.
    [*:o70kr28x]Unity should now import the Spriter2Unity package and then automatically convert your SCML files to prefabs. The prefabs will be in the same folder as the SCML files.

    There's an example included which imports the GrayGuy character and animates him via Mecanim.

    I'm currently working on the in-code documentation to make it easier for other people to contribute. You are very welcome to fork the repository and create pull requests!

    If you have any questions feel free to ask them here. I'd appreciate it if bug reports would be done via GitHubs issue system (https://github.com/bonus2113/Spriter2Unity/issues), but I if you don't want to create a (free) GitHub account, this forum is fine as well.

    Changelist

    26th of June 2014:


    • [*:o70kr28x]Fixed ZIndex Animation
      [*:o70kr28x]Added an example
      [*:o70kr28x]Implemented Sprite changing into the native Unity animations

  3. I guess you are using an outdated version of the converter.

    Try using this one: https://github.com/bonus2113/Spriter2Unity

    Instead of having an external tool to convert the SCML files you can just drop them and all the assets into your Unity project.

    1. Download this Unity package: https://github.com/bonus2113/Spriter2Unity/raw/master/Package/Spriter2Unity.unitypackage

    2. Open your Unity project.

    3. Import your whole Spriter project folder into Unity.

    4. With Unity open, go to the folder you saved the Unity package to and double click it.

    5. Unity should pop up with a dialog asking if you want to import the assets, click import on the bottom right.

    Unity should now import the Spriter2Unity package and then automatically convert your SCML files to prefabs. The prefabs will be in the same folder as the SCML files.

  4. A new thread sounds like a good idea, seeing how this one is from back when Spriter2Unity was a Python tool.

    I'll spent some time documenting the current code (mostly so that I'm completely comfortable working with it) and fixing the bugs we are experiencing right now.

    I'll put the thread up as soon as the documentation is usable!

×
×
  • Create New...