playMaker

Author Topic: [Solved] Custom variable types?  (Read 5639 times)

jwvanderbeck

  • Playmaker Newbie
  • *
  • Posts: 18
[Solved] Custom variable types?
« on: December 14, 2014, 12:00:15 PM »
I want to see about integrating some other third party tools we are using for our game, but I don't see it being possible using only the variable types given by PlayMaker.

Is it possible to add custom variable types?
« Last Edit: December 15, 2014, 03:23:39 PM by jwvanderbeck »

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Custom variable types?
« Reply #1 on: December 14, 2014, 09:12:07 PM »
If you choose the Object var type in playmaker then go into the variable settings you'll be able to create custom var types- also get/set property can be helpful controlling other scripts as well
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

jwvanderbeck

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Custom variable types?
« Reply #2 on: December 15, 2014, 10:22:01 AM »
If you choose the Object var type in playmaker then go into the variable settings you'll be able to create custom var types-

Thanks I hadn't noticed that before.  Oddly though some of what I need is in that list and some isn't.  I'm not sure why some types are there and some aren't, but they aren't all there.

Plus I really need to work with Arrays and I don't see support for that anywhere.

mdotstrange

  • Hero Member
  • *****
  • Posts: 555
    • Can't code? Who cares! Make games anyway!
Re: Custom variable types?
« Reply #3 on: December 15, 2014, 10:28:54 AM »
Make sure you into the Unity.Engine hierarchy for all the types- if you want to use arrays in Playmaker install the free add on Arraymaker or wait for version 1.8 as its supposed to have native array actions- but arraymaker works well now
Indie game dev and instructor at the Strange School. Learn Playmaker at the Strange School!

jwvanderbeck

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Custom variable types?
« Reply #4 on: December 15, 2014, 02:40:47 PM »
Make sure you into the Unity.Engine hierarchy for all the types- if you want to use arrays in Playmaker install the free add on Arraymaker or wait for version 1.8 as its supposed to have native array actions- but arraymaker works well now

No they really aren't there, not anywhere in the list.  Some of the types are, some aren't.  I can't find the logic, but I have looked exhaustively at the entire list :(

ArrayMaker looks like it basically just does what I already wrote code to do, which is to say use a standard GO to hold the arrays, so I will just hold out for built in support for now.  Thanks.

I am working around all these issues as best I can and it is doable, just not clean.  Wish I could figure out why some of the types aren't showing up in that list.

jwvanderbeck

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Custom variable types?
« Reply #5 on: December 15, 2014, 03:23:25 PM »
Ok I figured out my issue.  The variable types that I needed that weren't in the list, apparently don't descend from MonoBehaviour.  I am building proxy wrappers and all is good.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: [Solved] Custom variable types?
« Reply #6 on: December 16, 2014, 02:45:52 AM »
Hi,

 yes, that's the way to go, and you can also create a class inhereting Object and then you can use the fsm object variable to host it ( but be careful with the memory and garbage collection, it's not ideal).

 Bye,

 Jean