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
usingUnityEngine;
usingSystem.Collections;
namespaceFlowCanvas.Nodes{
publicclassCustomEventNodeExample:EventNode{
privateFlowOutput raised;
protectedoverridevoidRegisterPorts(){
raised=AddFlowOutput("Out");
}
publicoverridevoidOnGraphStarted(){
TapGesture.Tapped+=EventRaised;
}
publicoverridevoidOnGraphStoped(){
TapGesture.Tapped-=EventRaised;
}
voidEventRaised(){
raised.Call(newFlow());
}
}
}
Is this what you mean or something different?
Thanks
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.