IUnityEventQueue - how do I use it?

I am currently writing a C++ native plugin for my Unity application.

I’ve came across the IUnityEventQueue.h file in the UnityPluginAPI folder, but documentation is pretty thin on the ground - do some docs and/or examples exist for writing native plugins that use it?

What I want to do is; issue an event from my Unmanaged code that is then picked up on the Unity main thread in Managed code - is this possible? Currently I am achieving this with Unmanaged->Managed callbacks, but I would prefer to use a more robust solution if one exists. From the comments in the IUnityEventQueue.h file, this sounds like it may be possible, but there are no examples of how to achieve this.

You are on the right track, the IUnityEventQueue.h described everything you need know to use it.

Fire when you want

use static class based eventhandler to catch these events (pass to main thread etc…)

The comments in the header make explicit mention of a “global event queue”, even naming it in the UnityEventSystem namespace GlobalEventQueue::GetInstance ().SendEvent (evt);. But it doesn’t appear anywhere in the header, so I’m mystified how this is supposed to work.