If you already have custom scripts functions on some of your MonoBehaviours that play animation, you can use “Script Control” actions like “Call Function”, to call those functions directly through reflection.
I think that I misunderstood your question though, and what you want to achieve 🙂 .
Can you please provide a bit more info so that I can provide a better answer?
Thanks!
You can set up any callbacks you want in node canvas.
So you would hook up an animation event to something like this
In your monobehaviour you would have a basic function that connects to the node canvas.
[attachment file=”12298″]
In the node canvas custom condition or action, you would register it with the [EventReciever(“recieverName”)] class decorator
[attachment file=”12299″]
and then you would get that class as a condition or action node that will fire when the event is called
[attachment file=”12300″]
Another way, would be to select the “SendEvent” function for the target function to be called by the Animation Event in it’s inspector and give it a name:
[attachment file=”AnimationEvent.png”]
Then within NodeCanvas graph, you can use the existing “Check Event” condition, and set the event name to be the same as the one you set in the inspector above (in this case, “MyEventName”).
[attachment file=”AnimationEvent2.png”]
As such, whenever the Animation Event is encountered, a NodeCanvas event named “MyEventName” will be send to the owner graph and the “Check Event” condition will return true for that same frame, thus “OK” will be logged for the above example.
Let me know if you need more clarification on this.
Cheers.