playMaker

Author Topic: iTweenMoveToActionEditor handles not persisting path modifications  (Read 2376 times)

Pawl

  • Playmaker Newbie
  • *
  • Posts: 8
Greetings,

I'm using an iTweenMoveTo action and have specified 3 PathNode GameObjects in my scene. I've dragged them into the PathNodes inspector and I see the yellow path being drawn in the Scene correctly.

When I attempt to move a path node using the Handles widget in the Scene, I see the path update and I see the Vector in the inspector change with the amount I've dragged (as expected), however, after I'm done moving the handles and I select any other GameObject in the Scene, the Vector offsets get reset back to their original values.

If I specify a Vector offset manually using the keyboard and hit 'return', the values do persist. It seems to be an issue with the handles, but I've been unsuccessful debugging iTweenMoveToActionEditor.cs.

I'm running Unity 4.5.1f3 with the latest version of PlayMaker on a Windows machine.

Thanks for your help.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: iTweenMoveToActionEditor handles not persisting path modifications
« Reply #1 on: August 03, 2014, 03:06:06 PM »
Sorry about that, looks like a bug in 1.7.7.
Please try the attached fix...
(this version also updates editor fields while moving the handles)

Pawl

  • Playmaker Newbie
  • *
  • Posts: 8
Re: iTweenMoveToActionEditor handles not persisting path modifications
« Reply #2 on: August 03, 2014, 05:01:40 PM »
Thanks Alex, that appears to have done the trick!!

This was the secret sauce I was looking for: :)

Code: [Select]
FsmEditor.SetFsmDirty();
FsmEditor.SaveActions();

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: iTweenMoveToActionEditor handles not persisting path modifications
« Reply #3 on: August 03, 2014, 10:34:35 PM »
Yeah, normally this should be enough:

Code: [Select]
FsmEditor.EditingActions();
This is supposed to tell the main editor that you're editing an action and it should handle the rest, but it was buggy in 1.7.7, so I modified the script to manually handle setting dirty and re-saving the action... it shouldn't be necessary in the next update...