playMaker

Author Topic: Component variable/action support  (Read 3327 times)

Andy22

  • Junior Playmaker
  • **
  • Posts: 99
Component variable/action support
« on: October 15, 2013, 05:34:28 AM »
Hi,

while starting to wok with NGUI+Playmaker i noticed that the "Enable Behavior" action is missing the support to use a playmaker variable (reference to the component)?
This means u cant have/reference multiple components of the same type on one gameobject and manage it using playmaker.

In our case we tried to enable/disable several UI widgets using playmaker and a handy way would be to expose a "Component" variable and let the user set/wire up all the NGUI widgets, without specifically letting the FSM know what type this Widget is. This means all the FSM needs to knows is that it should enable/disable the "components" based on the user set variable. This helps remove unnecessary information from the FSM and keep things more flexible.

So can u add component variable support and add it to the appropriate actions? This should also work with any type of component, not just Monobehaviours aka (lights/mesh....)

thx Andy
« Last Edit: October 15, 2013, 05:36:51 AM by Andy22 »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Component variable/action support
« Reply #1 on: October 15, 2013, 09:02:46 AM »
You can store component references using Object variables of type UnityEngine.Component. I'll look into adding these as parameters in the relevant actions...