I'll use an example from BAR, BAR in this example in many places has code that does what you need on a higher level, this is not a problem in fact it's a good thing. I just want you to keep in mind this is not exactly what we'd do in terms of pure Recoil usage, the important bit is identifying the problem ("I need to send a notification something happened in synced code to UI") and what kind of things are involved in getting a solution.
- BAR wants to notify UI that it received from engine that units were given from a team to another here
- To do that, in the synced part of the gadget, it uses
SendToUnsynced("NotificationEvent", "UnitsReceived", tostring(player))
, I won't explain this usage, read the second link I sent you on the recoil engine guide. Or look for other places in BAR code where this is used. - Notice in the unsynced part of the gadget it does