playMaker

Author Topic: working with object types  (Read 1801 times)

Jake

  • Junior Playmaker
  • **
  • Posts: 61
    • Fluffy Underware
working with object types
« on: December 12, 2012, 09:16:16 AM »
Hi,

I'm looking for a way to work with non unity classes (derived from object instead of Object) in actions and events. E.g. I'd like to create actions to manipulate individual particles from my particle engine and those particles are plain C# classes.

I can create custom actions to work with these classes, but I see no way to pass a reference with EventData and store it in a variable for use in later actions.

Any ideas how to achieve this?

Jake



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: working with object types
« Reply #1 on: December 13, 2012, 08:57:36 AM »
Hi,

 yes, you simply need to compose your class into a compliant Object class. simply ba declaring a public property of your class type. Then you can get and set your custom class within that Object class whenever, Playmaker ignore the content of your Object class, so you can put anything you want inside it.

 that's how I would do it. Check out my port of Vectrosity, I had some similar problems, it may give you some ideas on how to tackle your issue.
https://hutonggames.fogbugz.com/default.asp?W948

bye,

 Jean