Playmaker Forum

Playmaker Updates & Downloads => Share New Actions => Topic started by: tcmeric on July 19, 2017, 11:25:17 PM

Title: Spine Actions
Post by: tcmeric on July 19, 2017, 11:25:17 PM
Hello. I will be posting updates to the spine actions here in this thread. Please comment if you would like to follow the updates. I am open to suggestions about which actions you would like to see (within my programming abilities and spines unity capabilities).

I've created a single action to start off, and make sure that it is working for everyone. Please note, I am using unity 2017.1 (although this should work with 5.6 as well) and the newest version of the Spine-Unity 3.6 runtime unitypackage. It is required that you have this (free) package installed in order to use these actions. You can download it here:

It is likely to work on earlier version of unity/spine runtime package, but is untested. Please always backup your project before trying something new.

Today I have attached a single action. I will open a github account to host the actions soon. Once there is enough actions for it to be considered "working", I will move them over to the ecosystem.

Please note these actions are NOT upgradable from other spine actions that may have been released before.

Action: Spine Play Animation.

Allows you set an animation for a spline character by string. Please note I chose to use strings because they can be saved a playmaker variables easily.

Options: looping, track index.
Title: Re: Spine Actions
Post by: tcmeric on July 20, 2017, 10:47:43 AM
I have updated the "Spine Play Animation" to use an event. The event will trigger once the animation is complete. If the event is left blank, it will go to the next state immediately.

Also here is a flip X / Y action.

Thanks for sticking with me until I get a better handle on the spine API  8)
Title: Re: Spine Actions
Post by: Wayne191 on July 21, 2017, 04:25:43 AM
Thank you for your help.  :) :)

I tested it with Unity 5.4 and Spine 3.5 and it works. Other actions could be Time Scale ( we can adjust it in Inspector, but not with different  animation name ) or Skins function.

Here is a link to the page for Skins function in case you need it:
Title: Re: Spine Actions
Post by: HeathClose on July 21, 2017, 05:36:22 AM
I will test these as soon as I can... thank you for this!
Title: Re: Spine Actions
Post by: tcmeric on July 21, 2017, 06:51:43 AM
Thanks for the suggestions. Ive added the actions to my github for now, to make it easier to manage.

Actions added:

Spine Add Animation (similar to play animation, but add them to the queue, rather than playing immediately).
Spine Add Empty Animation
Spine Get Mix Duration
Spine Set Time Scale (for all animations)

Actions Updated (no breaking changes):

Spine Play Animation (added set time scale per this animation state only)

To Do Next:

Actions for Skins Function
Title: Re: Spine Actions
Post by: pixelpaste on October 07, 2017, 08:04:41 PM
Whoo thanks a lot for this!
Title: Re: Spine Actions
Post by: artixpro on January 15, 2018, 05:45:07 AM
using UnityEngine;

namespace HutongGames.PlayMaker.Actions

   [Tooltip("Artix Production")]
   public class SendEventEndAnimation : FsmStateAction

      [Tooltip("The GameObject to be observed.")]
      public FsmOwnerDefault gameObject;

      [Tooltip("Send this event when animation finished.")]
      public FsmEvent sendEvent;

      [Tooltip("The name of the animation to be observed.")]
      public FsmString animationName;

      private Animator animator;

      public override void Reset() {
         gameObject = null;
         sendEvent = null;
         animationName = null;

      // Code that runs on entering the state.
      public override void OnEnter() {
         var go = Fsm.GetOwnerDefaultTarget(gameObject);
         animator = go.GetComponent<Animator>();

      // Code that runs every frame.
      public override void OnUpdate() {
         var a = animator.GetCurrentAnimatorStateInfo(0);
         if (a.IsName(animationName.Value) && a.normalizedTime >= 0.98f) {
Title: Re: Spine Actions
Post by: rondmc on February 12, 2018, 02:28:50 PM
Gonna follow for this, thanks! I just got Spine and PlayMaker functionality is always welcomed.