How can Unity headless server interact with Photon Server?

Hi, I'm developing a server authoritative game. Lately, I'm wondering if that's possible to let the game server run a headless Unity for each room as a dedicated server, that seems could simplify the development. However, the headless server only takes string arguments on start, I still have no idea about how to let it handles IPluginHost. Please tell me which one is viable.

a) HivePlugin executes "MyGame.exe" and passes some variable to it
b) Run HivePlugin/SDK directly inside "MyGame.exe", just like the load balancing API.

Comments

  • Hi,
    a) should work. Start os process from plugin when room created and terminate it (send message to process asking to exit) when room closes. You can communicate with process via tcp or pipes. All the info required for initialization can be passed in process command line parameters.
  • Thanks for your reply @vadim , that sounds work. I thought Photon has implemented something to let Unity/PhotonServer communicate with each other.