- Editado
PLAYMAKER Integration
- Editado
UPDATE : Patch applied. Namespaces added for latest Spine 3.x runtime.
The goal these actions is to have animation characters (or whatever) controller done completely just in Playmaker.
Let me know what are your needs?
Download : spine_playmaker.zip
SpineAnimationAction.cs (Sets or Adds your animations)
SpineEventAction.cs (Events listener start, end, complete plus custom spine events)
SpineEventConditionAction.cs (Listen and react to your events according to condition you specify)
SpineSlotAction.cs (Sets attachment and color of a slot)
V1.0 - First Spine's playmaker actions RELEASED. Already with these you can create nice animation controllers.
V1.1 - Added SpineSlotAction.cs
Cool stuff Thanks for sharing!
This looks great. I don't use Unity but am willing to try it after checking out Playmaker and Foriero's integration with Spine.
Thanks Spiral, I will look into Mitch's implementation. In the meantime I did create new action and cleaned a bit the old ones. The new one is called SpineEventConditionAction.cs. Just set your condition on what you want to react and you are good to go.
Please download actions from initial post of this thread.
foriero escreveuThanks Spiral, I will look into Mitch's implementation. In the meantime I did create new action and cleaned a bit the old ones. The new one is called SpineEventConditionAction.cs. Just set your condition on what you want to react and you are good to go.
Please download actions from initial post of this thread.
Hi foriero,
I registered just to say thanks! I truly appreciate the actions, hope you can keep maintaining this.
Thank you.
Thank you ;-)
Hey,
This seems great, looking for a little advice though.
(Classic n00b warning - I'm super new to PlayMaker).
Is there a way to chain animations through PlayMaker? Meaning one after the other, my goal is to have a series of animations play and then fire a Complete Event.
I'm also wondering if there is a way to grab a random spine animation through PlayMaker? I could use a sendMessage to call a function - but that would just lead me to setting the animation through code (like I would normally).
Thanks for the help - sorry for starting a thread within a thread - PM holds some great possibilities with Spine.
r2c
hello... sorry for late reply... is you can chain your animations in playmaker.
and also yes... not so hard to use SendRandomEvent action from playmaker and set your animation
guys I'm working on SpineSlotAction so that you can set attachments, color or disable or enable attachment.
You need more actions to control your spine animations in Playmaker? Please write here.
This is cool, but it won't work with variables at the moment. So if you need to control multiple objects that animate from one FSM you cannot.
foriero escreveuhello... sorry for late reply... is you can chain your animations in playmaker.
and also yes... not so hard to use SendRandomEvent action from playmaker and set your animation
guys I'm working on SpineSlotAction so that you can set attachments, color or disable or enable attachment.
You need more actions to control your spine animations in Playmaker? Please write here.
That sounds excellent, are you still updating this? I'd love to give it a whirl in my next project.
Hiya, this is really great to see the Playmaker Integration however for some reason I can't get it working...
I've put the various scripts in the Playmaker Action and Editor folders but somehow I get the following messages.
Assets/PlayMaker/Actions/Editor/SpineActionEditor.cs(23,21): warning CS0168: The variable `action' is declared but never used
Assets/PlayMaker/Actions/Editor/SpineAnimationActionEditor.cs(44,71): error CS0021: Cannot apply indexing with [] to an expression of type `Spine.ExposedList<Spine.Animation>'
Any ideas how I can sort this out?
Thanks a lot. :-)
Hi Ive come late to this as well, and im getting the same error as John above? Whats the best way to fix this.
Thanks
How to install your action events? It does not show up in playmaker yet.
19 Nov 2015, 11:47
Foriero, I have imported the .cs only and can access some features. However I do not understand all the actions and their implications. An explanation/video about how to install your code and how to use it in Unity would be ab-so-lu-te-ly fantastic!
A fan
Hey there I also have the same error as John and was wondering if you've looked into it? This is exactly what i need to finish my project and it would be very appreciated
Hi guys,
I also run into this problem and made a patch until the author makes his own fix.
Just overwrite the original files in "Editor" folder with corresponding ones in the attached file.
Cheers
Okay I've edited this comment way too much but. I've figured out a way to implement animation blending:
In the SpineAnimationAction, I added this:
[Tooltip("")]
public int i;
and then i changed the value '0' on the AddAnimation, SetAnimation and ResetAnimation inside the
'public override void OnEnter()' to an 'i'. Like this:
skeleton.state.SetAnimation(i, animationName, loop.Value);
And lastly, in the SpineAnimationActionEditor I added EditField("i");.
With this, the action will have 1 extra visible variable, namely 'i'. this represents to what type the animation belongs. When Spine animations belong to different groups, they can blend with each other, otherwise you will get one animation running while the other is there, but just not playing.
I hope this helps somebody
IMPORTANT: this fsm action is kind of weird when you change the code. the 'Animation' field disappears when you change the code, so do the following:
Before changing the code:
- add a SpineAnimationAction to a playmaker FSM, and select the 'Animation' tab and choose your appropriate animation.
- Test it to see if it works.
If it worked:
- Change the scripts as mentioned above.
- check your SpineAnimationAction in your fsm action and check if 'i' is there. By now you might have noticed that the 'Animation' tab has disappeared.
- Test again, you will see the animation play even though the tab had disappeared!
- Check your playmaker fsm, for some reason, the 'Animation' tab is back. Now you can work normally again.
I don't know what causes this. there's a chance you might not have this but regardless, try it out just in case. otherwise you will have to reimport the download file and the patch file.
Hey CrispyArrow or anyone that has tried this out. How does the blend work? I added the code into the action but I dont know what you mean by
When Spine animations belong to different groups, they can blend with each other
Can you help me out in explaining this a bit more?
EDIT: I also converted the Spine sprite attacher script by Mitch to playmaker and is attached.
Hi everyone:
I have just started using unity and playmaker. I tried to install the scripts and I got an error as well. Any updates on any of this or further integration of spine and playmaker?
I am trying to find out how I can create animation files from the animations that are under the Spine_SkeletonData and bring it into the Animator editor.
cheers
Bez