playMaker

Author Topic: FsmProperty limitations, workaround?  (Read 1925 times)

Krileon

  • Full Member
  • ***
  • Posts: 107
FsmProperty limitations, workaround?
« on: February 16, 2014, 11:01:39 AM »
FsmProperty only displays the properties that PM can store as FSM variables. My issue is I don't want to store it as an FSM variable. I have a playmaker action for my JSON.Net implementation that takes property and encodes it. All I want to do is send that property to the FSM. I don't actually want to store it as an FSM variable (I'll store the JSON string output by the FSM).

How can I have a property dropdown that shows all of a components properties regardless if PM can store them or not? Can I implement my own type like FsmProperty that'd handle this? If so can you provide an example? I decompiled the FsmProperty, but am unsure if copy/paste/modify into a new script will even work.

Edit: Ok, copy/paste/modify of FsmProperty doesn't work for sure. So I guess that's not an option unfortunately.
« Last Edit: February 16, 2014, 11:12:59 AM by Krileon »

Krileon

  • Full Member
  • ***
  • Posts: 107
Re: FsmProperty limitations, workaround?
« Reply #1 on: February 16, 2014, 06:26:07 PM »
Ok, I just used an FsmString and grabbed the property from the object based off the string. It's not as elegant as a nice dropdown, but it'll work.
« Last Edit: February 17, 2014, 08:12:04 AM by Krileon »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FsmProperty limitations, workaround?
« Reply #2 on: February 17, 2014, 10:27:37 AM »
json... uhm :)

working on some json actions as well, curious to see how to are tackling this :) is it going to be available sometime?

bye,

 Jean

Krileon

  • Full Member
  • ***
  • Posts: 107
Re: FsmProperty limitations, workaround?
« Reply #3 on: February 18, 2014, 08:47:35 AM »
I'm using JSON .Net asset from the asset store as it provides the best implementation compared to JSON .Net free DLL. It works perfectly fine and I'm already working on custom converters to handle data properly (my PM action can filter to or exclude object properties as well). So far I've JSON for an object property (good for array object properties or just to JSON a single property) and I'll be working on others to encode entire components, etc..

No, I had no plans to release it. I don't have time, or even the desire, to provide support so if I released it there's a bit of obligation to do so. It also uses a custom converter I wrote so that'd need to be released too.

There's also a current bug with it handling Texture2D properties that I'm working on resolving (it should encode it to name property, but fails).

I also plan to extend this to handle arrays of data, because I hate having to use a proxy for array maker. If I encode/decode on the fly it should be pretty reasonable to have arrays of data. Obviously I can't encode everything, but it should work for most cases (like inventory data, etc..).

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: FsmProperty limitations, workaround?
« Reply #4 on: February 18, 2014, 11:48:55 PM »
Hi,

 It's up to you really, some assets on the wiki are not really supported neither. It's just for others to get inspired. But no worries, members willing to use json most likely can create everything they need to implement it in PlayMaker anyway.


Bye,

 Jean