Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: Andy22 on October 15, 2013, 05:34:28 AM

Title: Component variable/action support
Post by: Andy22 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
Title: Re: Component variable/action support
Post by: Alex Chouls 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...