I am trying to create a Task in NodeCanvas which has an input List of GameObjects and needs to send an Event to each one of those GameObjects. I can not use SendGlobalEvent because I have more than 50 GameObjects that use the same FlowSript Asset.
I am doing a ForEach to the list and want to send an event to each of those GameObjects.
I am stuck with that, I am getting errors that the “agent” is a read only
can you suggest what the best use of the API to accomplish this?
Events are logged with this task as well, but only as long as the gameobjects in the list do indeed have a GraphOwner component attached and as such the even is indeed send in the end, since for gameobjects without the GraphOwner attached in the list, the even is not send.
I just rechecked this and can confirm that it works here :/
I’ve also checked like you said, an FSM sending and event to multiple FlowScriptControllers.
Hmm.. Are the FlowScriptControllers enabled when the event is send? That is, is the “OnEnable” option set to “Enable Behaviour” in the FlowScriptController inspector and the gameobject active as well?
Can you share a bit more information on your FSM setup please?
Or better yet, if you can send me a small project reproducing this, that would be great of course!