I have a FlowScript attached to a prefab that, during the “On Start” event, invokes SendEvent, targeting a child of this prefab.
When the prefab is instantiated, the “On Start” event is triggered properly, but SendEvent doesn’t work. There’s no logs in the FlowCanvas console indicating an event was sent, and the Custom Event node isn’t triggered. Switching On Start with On Update resolves the situation, but is messy and inefficient.
Just to clarify, are you calling a SendEvent from the root gameobject graph, that you are expecting to be “catched” by a graph on the child gameobject? If that is the case, then the problem should be that, when the root graph “Start” is called, the child graph is not yet initialized and as such the event is never catched. One of the changes I am planning for the next version, is to initialize the all graphs before any “Start” event is called. This will effectively fix the issue, if that is indeed your setup.
> <span style=”background-color: #fbfbfb; color: #323232; font-family: ‘Open Sans’; font-size: 12px;”>Just to clarify, are you calling a SendEvent from the root gameobject graph, that you are expecting to be “catched” by a graph on the child gameobject?</span>
Yep!
> <span style=”background-color: #fbfbfb; color: #323232; font-family: ‘Open Sans’; font-size: 12px;”>If that is the case, then the problem should be that, when the root graph “Start” is called, the child graph is not yet initialized and as such the event is never catched. One of the changes I am planning for the next version, is to initialize the all graphs before any “Start” event is called. This will effectively fix the issue, if that is indeed your setup.</span>