The included “Code Event” node is only able to subscribe to events of type System.Action or System.Action(T). this is the case in NodeCanvas as well.
If you have created a custom event node though, here is an example of how:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using UnityEngine;
using System.Collections;
namespaceFlowCanvas.Nodes{
publicclassCustomEventNodeExample:EventNode{
privateFlowOutput raised;
protectedoverride voidRegisterPorts(){
raised=AddFlowOutput("Out");
}
publicoverride voidOnGraphStarted(){
TapGesture.Tapped+=EventRaised;
}
publicoverride voidOnGraphStoped(){
TapGesture.Tapped-=EventRaised;
}
voidEventRaised(){
raised.Call(newFlow());
}
}
}
Is this what you mean or something different?
Thanks