A blog whose posts are all written by human

How to Easily Share Code Between Unity and Server
In a Client-Server architecture, the client and the server need to share the api codebase for consistency. Some solutions to do so are as follows: Git submodule: Have three repositories (client, server, api). The client repo adds the api repo as a submodule. Do the same for the server. Monorepo: Have one repository (say MyGame). Create three directories at the root: /Client, /Server and /Api, each containing its corresponding codes. Symlink: Create a Symlink to the API for the client and the server to reference. …and many more. Simply put, the client and the server each need to reference the same codebase. But it’s not elegant to put the API codebase in the Unity project’s Assets/ directory, as it has other codes that are used only by Unity. It’s better to put the API codebase outside of the Unity project, and have the client and the server each reference it. This post explains how to do so. ...