playMaker

Author Topic: Hide Action in action tab  (Read 3988 times)

kiriri

  • Hero Member
  • *****
  • Posts: 506
Hide Action in action tab
« on: June 29, 2013, 06:01:44 AM »
Hey,
It would be very handy if you could implement a way to make scripts that inherit from HutongGames.PlayMaker.FsmStateAction not show up in the actions tab.

In my current case, I have a couple of scripts that all use many of the same variables and functions, and I'd like for them to inherit from a script so that I won't have to change each script individiually if I have to change any of these functions or variables.
However, I don't want for that script to actually show in the Actions tab in PlayMaker, because it might confuse people. It needs to inherit from HutongGames.PlayMaker.FsmStateAction though, because the scripts that inherit from it are real actions and should show up.

So yeah, this is probably a very simple request, but it would be very nice to have. It'd need to be a bool that could be either true or false (because if my actions inherit from a script that does not show up in the actions tab, then they wouldn't show up either, so you'd need to be able to override the "Do not show" with "Do show".)
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Hide Action in action tab
« Reply #1 on: July 01, 2013, 02:57:33 AM »
Hi,

 Yes, that would be very handy. A simple attribute on the custom action class would be cool like "showInBrowser=false" and default is true or something.

bye,

 Jean

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Hide Action in action tab
« Reply #2 on: July 01, 2013, 10:18:16 AM »
You can make the base class abstract and it won't show in the action browser.

Look at GUILayoutAction for an example - it's the base class for GUILayout actions and doesn't show in the browser.

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: Hide Action in action tab
« Reply #3 on: July 01, 2013, 10:50:56 AM »
nice, thanks for the help Alex!
Best,
Sven