playMaker

Author Topic: Support for Plane structs as a variable type  (Read 958 times)

Allar

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
Support for Plane structs as a variable type
« on: May 26, 2013, 05:05:20 PM »
I would like the ability to directly use UnityEngine.Plane as a variable type, or at least have some support in extending Playmaker easier with new variable types, or at the very least, allow UnityEngine.Plane to be exposed through the FSMObject variable type system.

At the moment, I can make custom actions that hide a lot of the Plane math I need to do, but it would be nice if I can work with Planes directly and have a Plane variable of some kind identifiable in the FSM so multiple actions can use it directly.

If there is a way to handle UnityEngine.Plane in Playmaker, I apologize. I only recently picked up Playmaker, and so far its simply fantastic. Just would like better struct support :D

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12344
  • Official Playmaker Support
    • View Profile
Re: Support for Plane structs as a variable type
« Reply #1 on: May 26, 2013, 10:17:47 PM »
Hi,

 simply create a "Object" class and store your plane struct inside, then you build the necessary custom actions to go with this.

 WARNING: Unity Object do not get garbage collected like you would expect. If you plan on declaring such Object very often, you will have to call manually UnloadUnusedAssets to avoid memory leaks, especially on Mobile.

bye,

 Jean