Control Unity-Editor with external software

Hi,

does anyone know if it’s possible to interact with unity (specificly send messages to my own editor script) from outside Unity?
I’m planning to program a macOS app that adds MacBook Touchbar functionality to Unity. One major task is to get the output from my Mac app into Unity. One bonus would be that Unity can send information back to my macOS application, but for now I’m just making a proof of concept in a one way configuration.

The Setup should work like this:


Hope someone can help. Maybe there are general ways to tackle this, I’m not sure because I never did something like that. If this will be using reflection that fine too!

Greetings from Germany!

With further research the way to go seems to be to create a native macOS Unity plugin:

I’m still not sure how to do it, but this should be the right path!