playMaker

Author Topic: CustomActionEditor and custom categories  (Read 395 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
CustomActionEditor and custom categories
« on: October 29, 2023, 02:11:18 PM »
I'm using a third party extension that provides actions for PM but they're not stored in the proper categories. They're all over the place instead of being sorted by the name of the tool itself and it's annoying to go looking for them, it's a waste of time.

So I'm looking at CustomActionEditor and I'm wondering if it's possible to use it to change the categories of their actions?

I did a test with [ActionCategory("LOLIPOP")] put before the class declaration, and I shoved the whole code into a namespace HutongGames.PlayMaker.Actions to make sure no error was triggered, but the custom category attribute does not overwrite the default one.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7621
    • jinxtergames
Re: CustomActionEditor and custom categories
« Reply #1 on: October 30, 2023, 10:00:00 AM »
Hi.
if you can find their action scripts, you can change the ActionCategory and is should show in the written category.

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 773
Re: CustomActionEditor and custom categories
« Reply #2 on: November 01, 2023, 07:19:46 AM »
Here's the change I brought, yet nothing happens:

Code: [Select]
[CustomActionEditor(typeof(DebugFloat))]
    [ActionCategory("LOLIPOP")] // added that line
    public class CustomActionEditorTest : CustomActionEditor

It looks like only specific commands of the type "GUILayout" can alter anything, and only inside the actions. There's no higher level influence on how an action will be ordered in the browser.

Or there could, but then I'd need to find the special secret command that is exclusive to Playmaker. I don't think it exists.

[ActionCategory()] might only work on classes that inherit from FsmStateAction.
« Last Edit: November 01, 2023, 07:22:40 AM by Broken Stylus »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7621
    • jinxtergames
Re: CustomActionEditor and custom categories
« Reply #3 on: November 03, 2023, 08:04:14 AM »
This is the action "Editor" script.
it should be in the main action script.

The editor script is there to display variables differently on the action (inside a fsm)

for example if you would have an enum (Vector2, Vector3)

if Vector2 selected you can show a vector 2 variable,
and if Vector3 selected, show a vector 3 variable.