nicloay / unity-spine-importer

Bring data from spine (EsotericSoftware) in to the unity3d
BSD 3-Clause "New" or "Revised" License
37 stars 14 forks source link

draw order animation, slot color animation and support for the events #15

Closed abraksil closed 10 years ago

abraksil commented 10 years ago

Hey I reali like your importer. it saved me a lot of time. I'v added the draw order animation, slot color animation and support for the events.

nicloay commented 10 years ago

Hey Man, First of all, - great job! I've just glanced your code, I'll pull your code today, check it and commit to the master.

enmeii commented 10 years ago

I have to say you are doing an amazing work! Keep going!!!!! Support you.

nicloay commented 10 years ago

Kuba (i hope i didn't mixed up your name, abraksil), Could you check this commit from draw_order branch please daaa4f7460324cbc26568b176ce2c9d73de6e86e I've added test project there, and looks like there is unhandled NPE there, and importer does not create animation.

NullReferenceException: Object reference not set to an instance of an object
UnitySpineImporter.SpineUtil.addDrawOrderAnimation (UnityEngine.AnimationClip clip, System.Collections.Generic.List`1 orderAnimation, UnitySpineImporter.SpineData spineData, Single zStep, System.String animName, System.Collections.Generic.Dictionary`2 slotNameByName) (at Assets/UnitySpineImporter/Scripts/Editor/Util/SpineUtil.cs:552)
UnitySpineImporter.SpineUtil.addAnimation (UnityEngine.GameObject rootGO, System.String rootDirectory, UnitySpineImporter.SpineData spineData, System.Collections.Generic.Dictionary`2 boneGOByName, System.Collections.Generic.Dictionary`2 slotByName, UnitySpineImporter.AttachmentGOByNameBySlot attachmentGOByNameBySlot, System.Collections.Generic.List`1 skinList, Int32 pixelsPerUnit, Single zStep, ModelImporterAnimationType modelImporterAnimationType, Boolean updateResources) (at Assets/UnitySpineImporter/Scripts/Editor/Util/SpineUtil.cs:426)
UnitySpineImporter.SpineImporterWizard.OnWizardCreate () (at Assets/UnitySpineImporter/Scripts/Editor/SpineImporterWizard.cs:78)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.ScriptableWizard.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnGUI ()

Sorry, I'm not good at animation =), even in spine editor behaviour is quite strange for me. On 3d keyframe i move 1 slot to the top, but spine still show 3d slot.

abraksil commented 10 years ago

It's fixed. Missed that one - sorry for that. (Yee I'm Kuba :) :). You didn't mixed up my name)