Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Rebooter on May 10, 2020, 02:53:14 AM

Title: Playmaker Inspector: Field that can display dynamic string list
Post by: Rebooter on May 10, 2020, 02:53:14 AM
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?
Title: Re: Playmaker Inspector: Field that can display dynamic string list
Post by: djaydino on May 10, 2020, 05:56:02 AM
Hi,
If you select a variable, on the bottom is a check box called 'inspector' if checked the variable will be exposed in the inspector :)
Title: Re: Playmaker Inspector: Field that can display dynamic string list
Post by: Rebooter on May 10, 2020, 05:11:05 PM
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.
Title: Re: Playmaker Inspector: Field that can display dynamic string list
Post by: djaydino on May 11, 2020, 01:26:42 PM
Hi.
Hi an still not sure what you mean but if you want the generate arrays @ runtime you should use Array Maker (https://hutonggames.fogbugz.com/?W715)

As you can create lists and hash tables @ runtime and you can use the reference to access them.
Title: Re: Playmaker Inspector: Field that can display dynamic string list
Post by: Rebooter on May 31, 2020, 07:01:15 AM
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.
Title: Re: Playmaker Inspector: Field that can display dynamic string list
Post by: djaydino on May 31, 2020, 12:51:09 PM
Hi.
have a look at the Playmaker Api (https://hutonggames.fogbugz.com/default.asp?W127)