Since you you have c# events that you want to use, indeed the way you did it was the one to go. Alternatively you could also use the “Code Event” node which subscribes to a c# event through reflection, but of course having all 3 of those events together in one node like you did is a bit more nice.
Just to clarify, regarding the MessageRouter and the way the included nodes work through the use of GetTargetEvents(), it is usefull when not working with c# events, but rather with messages send to the target gameobject instead. In this case, a method with the same name as the event name needs to be implemented in MessageRouter.cs, which is a partial class, thus no source code changes needed.
But, in your case, what you did was the best approach anyway 🙂
Cheers!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.