Giter Site home page Giter Site logo

spriter2unity's Introduction

#Spriter2Unity

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:

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

Known issues:

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

Important missing features:

  • Sounds
  • Points
  • Boxes

##Usage

Copy the contents of the Assets folder into your Unity project's Assets folder or import the package from [here] (https://github.com/bonus2113/Spriter2Unity/raw/master/Package/Spriter2Unity.unitypackage). Any SCML files copied into the project will be automatically processed. Prefabs are created in the same folder as the SCML file.

Detailed:

  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.

spriter2unity's People

Contributors

daseyb avatar hakami-chan avatar malhavok avatar mythgarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spriter2unity's Issues

Compatibility issue with Unity 5

I can't seem to import the package into Unity 5.0.2 without having some form of compilation error, thus, I cannot use the script in the new version of Unity. Any fix for this?

Strange behavior [Spriter/Unity]

Hi friends,
I recently discovered the Spriter :-P software (used Spine until)...I need Spriter for making animations for Unity (v 4.6.1f), but I have some issues :???: and I'm wondering if are there solutions for this problems: First of all for some animations when are imported I get this :???: error:

Quaternion To Matrix conversion failed because input Quaternion is invalid {-1.#IND00, -1.#IND00, -1.#IND00, -1.#IND00} l=-1.#IND00
UnityEditor.AnimationUtility:GetCurveBindings(AnimationClip)
UnityEditorInternal.AnimationWindowState:get_allCurves() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:237)
UnityEditorInternal.AnimationWindowHierarchyDataSource:FetchData() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchyDataSource.cs:43)
UnityEditor.TreeView:ReloadData()
UnityEditorInternal.AnimationWindowHierarchyDataSource:UpdateData() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowHierarchyDataSource.cs:146)
UnityEditorInternal.AnimationWindowState:Refresh() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:525)
UnityEditorInternal.AnimationWindowState:OnGUI() (at C:/buildslave/unity/build/Editor/Mono/Animation/AnimationWindow/AnimationWindowState.cs:70)
UnityEditor.DockArea:OnGUI()

.this error generates strange behavior for this particular animation, video example: View My Video
Please help me as soon as possible...Thanks in advance !

Spriter assets covering non-Spriter assets

Import a Spriter animation into Unity (4.6) and place it behind another Sprite not made in Spriter.

Some elements in the Spriter animations are overlapping the other object that it is supposed to be behind, regardless of that object's transform.position.z

Other Spriter animations will overlap the other sprite completely.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.