Reply To: How to communicate with other scripts on other GameObjects

FlowCanvas Forums Support How to communicate with other scripts on other GameObjects Reply To: How to communicate with other scripts on other GameObjects

#1444
Gavalakis
Keymaster

    Hello,

    – The easiest way to get/set a property, or call a function on a c# script component attached on any gameobject, is to simply drag & drop that gameobject in the FlowCanvas editor. Doing so will open up a menu where you can select the target property you want to read/write, or the function to call.

    – To call a Custom Event node in a flowScript…
    — …From another flowScript, you need to use the ‘Send Event’ node and assign in that node, the target flowScript object as well as the Event name to call.
    — …From a c# script you need to call SendEvent function on the FlowScriptController class, something like this: GetComponent<FlowScriptController>().SendEvent("MyEventName").

    Please let me know if that helps, or if you need more details.
    Thanks!