Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Rebooter

Pages: [1]
Feature Requests / StringPopup Action Attribute
« on: June 06, 2020, 07:56:47 AM »
I'd like to see an Action Attribute added to Playmaker custom actions to make it easy to display a popup list of strings (that can be gotten from various sources) for a string field.


Specify list directly:
[StringPopup("Cat", "Dog")] public string animal;

Get list from an array variable in the FSM:
[StringPopup(ArrayVariable)] public string animal;

Get list from a method in a class.
First parameter is a class and second is name of a method that returns the strings:
[StringPopup(typeof(StringListGeneratorClass), "GetStringList")] public string itemName;

I tried to do this myself with Playmaker's ObjectPropertyDrawer and also CustomActionEditor. I find custom editor scripting difficult to begin with, and Playmaker's versions of these aren't the same as the Unity versions, so I can't figure out how to adapt code that works in Unity's inspector to work for Playmaker. The Playmaker events don't give a Rect or position to use to draw a custom control (such as a popup), and I'm lost with it.

So it would be nice to have this functionality built in.

Is there a way to display a list of strings in a Playmaker inspector that are generated by code at runtime?

Example: In a custom action I get a list or array of strings from some other object, and the string field can popup this list and allow an item to be selected?

Pre-release Discussion / Many FSMs == Very Slow Unity Inspector
« on: April 29, 2020, 09:14:49 AM »
When might we see a solution for the super slow Unity inspector rendering when there are lots of FSMs on it?

As it is now, if there are more then a few FSMs, the Unity inspector slows everything to a crawl, like < 5 fps. I have to either hide the inspector by switching tabs or click 'Collapse All Components' constantly (as Unity has a tendency expand things on the inspector automatically).

Maybe put the FSMs in their own window because it's annoying to use with how slow it is now.

PlayMaker Bug Reporting / AutoName
« on: February 25, 2020, 06:22:23 PM »
On actions overriding 'AutoName()', it doesn't seem to work when starting a new Unity session with the action rolled up. Only after expanding/collapsing does it show the AutoName title.

Unity 2019.3.2
Playmaker 1.9.9p19

PlayMaker Help / Prefab Variants: Adding FSMs
« on: December 27, 2019, 07:04:27 PM »
If you have a prefab with PlayMaker FSMs and you make a variant of the prefab, can you add an FSM in the variant? I tried this to test and was able to do so if I added the FSM through the inspector instead of the PlayMaker editor. The new FSM can then be edited in 'prefab edit mode'.

Since the PlayMaker editor won't allow adding a new FSM in a prefab variant, are you not supposed to do this? Could this cause problems?

PlayMaker Help / Actions that Use GetComponent
« on: October 27, 2019, 02:34:25 PM »
Does it affect performance a lot in actions that call GetComponent from OnEnter? I'm thinking for example of NPCs that have lots of states with PathFinding actions, so you might start getting a lot of GetComponent calls if you have many NPCs at once. I made a few custom actions that work with NavMesh agents and I added an optional NavMeshAgent object field for specifying the agent object directly. Is it worthwhile to do this?

PlayMaker Help / Object Type Field in Playmaker Action
« on: October 23, 2019, 09:59:05 AM »
Is there some way to have a public field in an action that lets the user select a type, similar to the 'Variables' tab's 'Object Type' field? I want to be able to select an Object Type then feed that to 'GetComponentsInChildren' something like this:



Ok, I found this in an action:

Code: [Select]
[Title("Component Type"), Tooltip("The type of Component to add to the Game Object.")]
public FsmString component;



But this uses reflection (which I gather is slow), so I will probably just make an action for the specific type.

PlayMaker Help / Send Event from C# Script to Specific FSM by Name
« on: October 03, 2019, 12:36:07 AM »
Is there a way to send an event by name to a specific FSM (also by name) from a C# script? I found PlayMakerFSM.BroadcastEvent() from a tutorial video, but it sends to all FSMs. I want to use a string array of FSMs.

PlayMaker Help / Unity 2019.2: Directives not working
« on: August 31, 2019, 01:14:51 AM »
I'm trying to use the GetAnimatorCurrentStateInfo action in Unity 2019.2 (Playmaker 1.9.0.p18). The directive at the top of the source file:

#define UNITY_5_OR_NEWER

doesn't seem to be working. None of the fields with the '#if UNITY_5_OR_NEWER' directive are visible on the action's inspector.

Edit: I copied the action to a new file and edited out all of the defines and it works, but I don't understand why the original doesn't work.

PlayMaker Help / How to Determine if an FsmVariable is assigned
« on: August 23, 2019, 03:13:35 AM »
In the script for an action, how do you determine if a variable has been assigned by the user?


public FsmFloat remainingDistance;

I need to know if the user has assigned a variable to the above, or if they have selected 'None'.

Is it 'remainingDistance.IsNone'?

I'm also seeing 'useVariable' and 'usesVariable'. What are these?

I tried modifying an action to get all Rigidbodies in children from a gameobject, but it is just returning an empty array. I have an array variable of array type 'Object' with object type 'Rigidbody', and the gameobject is set to the root bone of a model.

Would anyone know why this does not work?

using UnityEngine;

namespace HutongGames.PlayMaker.Actions

    [Tooltip("Gets all rigidbodies on gameobject and its children recursively.")]
    public class GetAllRigidBodiesInChildren : FsmStateAction

        [Tooltip("The GameObject to get recursive children from.")]
        public FsmOwnerDefault gameObject;

        [Tooltip("if true, will list inactive gameobjects")]
        public FsmBool includeInactive;

        [Tooltip("The Array Variable.")]
        public FsmArray array;

        private GameObject _go;
        private Rigidbody[] _result;

        public override void Reset()
            gameObject = null;
            includeInactive = false;
            array = null;

        public override void OnEnter()

        void Find()

            _go = Fsm.GetOwnerDefaultTarget(gameObject);

            if (_go == null)

            _result = _go.GetComponentsInChildren<Rigidbody>(includeInactive.Value);

            array.RawValue = _result;

Pages: [1]