playMaker

Author Topic: PlayMaker Customisation - Custom variable types  (Read 7334 times)

Bart

  • Playmaker Newbie
  • *
  • Posts: 3
PlayMaker Customisation - Custom variable types
« on: October 21, 2013, 03:52:18 AM »
Hi,

I have a rather technical question, closely related to http://hutonggames.com/playmakerforum/index.php?topic=2474.msg11091#msg11091.
http://hutonggames.com/playmakerforum/index.php?topic=3518.msg16185#msg16185

A couple of month ago, we started developing a unity tool allowing our Level Designers to visually design the workflow of events and actions taking place in a game.
One key feature of this tool was the possibility to call any method on any object (System.Object, not Unity.Object) and to store the result in any of the variables of its variable system.
This ensured that the LDs would automatically be able to use the features exposed by the coders, without having to create new action boxes to make the link. The tool was functional, but lacked a lot in edition features (copy, undo, nice UI, etc…)
Then it appeared to us that this tool would be nice to use for our UI designer as well, and discussed the matter with him, at which point he mentioned PlayMaker.
So we bought a version and after evaluating PlayMaker for a couple of weeks, we find that it really misses a feature to make it perfect for us: “custom variable types”.

The compositing solution mentioned in the forum is not satisfying, as it does not allow the user to create a new value (to use as function parameter call, for instance) from the action inspector.

Do you consider adding such a feature in a not too distant future?
If not, is there really no way to get a license type including PlayMaker source code so we could do study the question of doing it ourselves?

Best regards




jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker Customisation - Custom variable types
« Reply #1 on: October 22, 2013, 03:20:24 AM »
Hi,

 I don't think there are plans to open custom FsmXXX types if that what you mean.

What kind of class would you see implemented in your case? just so that I can see if there is a solution.

 When I have this need, I usually resorts to a simpler approach, for example using json or xml manage data, and that works very well actually. This means a much easier portability

A concrete use case would help also define a scenario and study various solutions with the existing set of tools PlayMaker provides.

 As for source license, Simply contact Alex at hutong games to see what can be done on this front. but I suspect if such license exists ( I don't know myself), it will come at a cost... I know for example that the Unity source license cost an eye if not more...

I would however not go down that road of modifying playmaker sources for such case because it will likely means breaking the ability to benefit from future updates. Creating Custom Editors for Actions is likely something preferable.

Pm me if you want to discuss this and share some work privatly if that makes it easier.


Bye,

 Jean

Bart

  • Playmaker Newbie
  • *
  • Posts: 3
Re: PlayMaker Customisation - Custom variable types
« Reply #2 on: October 22, 2013, 11:47:28 AM »
Thanks a lot for taking the time to answer me.

I meant only one more FsmXXX type, (i.e. FsmCustom) logically linked to VariableType.Custom, the same way FsmObject is linked to VariableType.Object.

It would be used exactly in the same way as FsmObject is, allowing to create variables containing a reference to an object of any type.
Well, putting it in a simpler manner: Just imagine you were not limited to UnityEngine.Object-derived classes in the Object Type dropdown in the Variables tab.

I'll precise our needs later, as I'm a bit in a hurry right now.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker Customisation - Custom variable types
« Reply #3 on: October 23, 2013, 01:47:22 AM »
Hi,

 Indeed, this is something that would be very handy.  An FsmClass would be soo nice, the problem being that serialization is a show stopper, unless the Class itself is responsible for its own serialization via a interface that must be implemented in order to be stored in an FsmClass.

I'll wait until you have more time to explain what you are after and some use case, and we'll take it from there.

bye,

 Jean

Bart

  • Playmaker Newbie
  • *
  • Posts: 3
Re: PlayMaker Customisation - Custom variable types
« Reply #4 on: October 23, 2013, 04:00:59 AM »
FsmClass is a much better name ;)

Yup, serialization is the problem here, when you want your LDs to set the object member values from the FSM editor. In the case the object is coming from the game framework, that's not a problem. In our visual scripting system, we had to use our own serializer.

I guess we'll have to use a wrapper class after all, combined with a custom PropertyDrawer and a special call method action.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker Customisation - Custom variable types
« Reply #5 on: October 23, 2013, 04:37:38 AM »
Hi,

 It really depends on the use case, but I have work around this issue many times to port all these different assets from the store, so, if you run into trouble let me know, I'll gladly assist.

bye,

 Jean