Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Broken Stylus 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 (https://hutonggames.fogbugz.com/default.asp?W1104) 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.
-
Hi.
if you can find their action scripts, you can change the ActionCategory and is should show in the written category.
-
Here's the change I brought, yet nothing happens:
[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.
-
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.