Reply To: Subscribing to Events from other plugins and scripts

FlowCanvas Forums Support Subscribing to Events from other plugins and scripts Reply To: Subscribing to Events from other plugins and scripts

#367
Gavalakis
Keymaster

Hello,

Sorry. I though the TapGesture is a static class. You can do the same for components by some small alterations to the code above. Here it is:

Notice that here, we instead derive from the generic class of EventNode, with an type argument of the type we need.
‘target.value’ gives you the actual component which is always the same type as the generic argument.
As with all the other event nodes, you can either leave the field in the node inspector empty to get the component automaticaly from the FlowScriptController gameobject, or you can assign a reference manualy.

Let me know if this works for you.

Thanks

Join us on Discord: https://discord.gg/97q2Rjh