This is indeed something I am trying to work around differently (if possible), because in some situations (like yours for example) it can be a huge hit and unfortunately Unity does not has “proper” events for these callbacks.
Probably the solution I will be going after officially, would be to create a few separate MessageRouters, each related to a specific set of callbacks, like for example “MessageRouter_TriggerEvents”.
As a temporary solution to that until updated, and like you suggest doing, removing the callbacks in MessageRouter that you don’t need (all but except OnCustomEvent), won’t affect the framework, other that of course the action/condition tasks, that make use of these callbacks.
So naturally, removing OnTrigger_X callbacks from MessageRouter, will make the CheckTrigger condition task not work, but everything else will work fine. You can then get a reference to MessageRouter and call it’s methods from any code your like, yes.
Let me know if that worked for you, or if your encounter any issues in doing so.
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.