playMaker

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.


Messages - Rebooter

Pages: [1] 2
1
PlayMaker Tips & Tricks / Re: Tip: Custom Action Template
« on: June 21, 2020, 08:30:27 PM »
Thanks for this, very nice.

2
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.

Examples:

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.

3
I went back and read this post again and realized that I kept saying 'at runtime' and I didn't mean that at all. I actually meant 'at designtime'. I just need a way to show strings in a popup box in the Playmaker action's inspector that I can supply with a method that returns the strings. Similar to the way Playmaker does when it shows a list of FSM names.

4
Pre-release Discussion / Re: Many FSMs == Very Slow Unity Inspector
« on: May 19, 2020, 07:28:47 PM »
I would think there should be some way to have a component on an object and not show in inspector (if not maybe Unity could add this functionality).

Probably the best way to do it instead on putting FSMs in a separate window would be to have each FSM have a toggle for 'Show on Unity Inspector' which would be 'On' by default.

5
Thanks, I do know about that, but what I meant was being able to call a method that would dynamically generate the strings when the field is entered and display them in the field's editor in the action (rather than having the strings preset), like the popup for 'FSM Name' in the 'Send Event' action. It's getting a list of FSMs on a gameobject and displaying them. I'd like to be able to do this, but with my own generated lists.

6
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?

7
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.

8
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

9
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?

10
PlayMaker Tips & Tricks / Re: Pooling system and NavMesh
« on: November 22, 2019, 09:33:47 PM »
Why is it that you can't use 'NavMesh agent move to' in that situation? I'm using a custom version of it that uses an FsmObject field to store the NavMeshAgent (set at design time) rather than using GetComponent to get it from the owning object.

I haven't trying pooling yet, but will need to when I get other things finished. This could be a major problem going forward, so what is it about that action that prevents it from working after being respawned as part of a prefab?

11
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?

12
Ok, I got it working. I had loaded the scene in Assets\Scenes\Level, I had missed the 'PlayMaker Unity 2D Demo' folder.

I had started over and deleted the project folder and after getting Playmaker imported, I had to comment out line 11 of the file  'PlayMakerAnimationEventProxy.cs' because it needed PlayMakerUtils which wasn't there. After doing this I was able to get the PlayMaker installer to run. Then I installed the ArrayMaker package which I guess contains PlayMakerUtils and was then able to uncomment the line.

13
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:

gameObject.GetComponentsInChildren<ObjectType>()

Edit:

Ok, I found this in an action:

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

***

ReflectionUtils.GetGlobalType(component.Value);

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

14
Ok, I got it to load. Playmaker is installed and there are no errors, but I'm not seeing any FSMs on anything.

15
I downloaded this and opened it in Unity. I got a lot of errors as Playmaker isn't installed in the project at this point. I download and import Playmaker, but it doesn't add anything to the Unity menus and the Playmaker installer doesn't appear. All the errors about missing Playmaker stuff still shows.

Pages: [1] 2