I divide it into three parts: unity client, logic server, headless mode unity. unity send command to logic server which written by any high level language(like java, C#). If the command need transform users, the logic server request(socket) ‘headless mode unity’ to do it, headless mode unity response(socket) result to logic server, logic server broadcast Transform to client in fixed time. Otherwise logic server handle the command by itself.
I think headless mode unity only need to do physics, collision detection, pathfinding. it should be requested in two ways:
- move request, like pathfinding, it execute in async mode. It will update in every frame until it complete.
- check request, like raycast hit check, it execute in sync mode. logic server need get the checked result to determine whether continue execute the next action.
I plan to every scene to instantiates a headless mode unity.
I hasn’t written any code to implements my idea, I want to listen to your opinions.