MultiConnectSDK › Export to .NET
1. Which server should you build?
Start with a Unity server. It is the simplest path, and Build and Deploy Server handles everything. Move to .NET if you find you need what it offers.
| Unity server | .NET server | |
|---|---|---|
| Setup | Add components, and deploy from Unity | A second project to create and maintain |
| Your code | One project | Scripts shared between two projects |
| Deploying | One button in Unity | Publish and upload, or use the CLI |
| Build size and memory | Larger, because it includes the Unity engine | Smaller, with no engine to carry |
| Start-up time | Slower | Faster, which helps on-demand servers |
| Build machine | Needs Unity and Linux Build Support | Needs only the .NET SDK |
| Debugging and tests | Unity tools | All the usual .NET tools |
| Unity features on the server | Most of them, without graphics | Only what is listed in Section 10 |
Benefits
- Can cost less to run: with no engine to load, each server needs less memory, so you may fit more on a smaller plan.
- Starts faster: this matters most for on-demand servers, where players wait while one starts.
- Simple builds: any machine with .NET can build it, including your CI, with no Unity install.
- Ordinary code: you can use any .NET library, and test your server without opening Unity.
Drawbacks
- Two projects: every change has to work in both, so a mistake can pass in Unity and fail on the server.
- No Unity engine: Unity's physics, animation, navigation meshes and asset loading are not there.
- Connections between objects are lost: a field pointing at another GameObject or component is not exported, so your code has to set it.
- Manual steps: exporting prefabs and copying scripts are separate steps you have to remember.
Choosing
| Your game | Build |
|---|---|
| You want to get running quickly | Unity server |
| The server needs Unity's physics, animation or navigation | Unity server |
| A card, board or turn-based game with simple server logic | Either. .NET saves money at scale |
| Many short matches on on-demand servers | .NET, for the faster start |
| The server only uses MultiConnectSDK physics | .NET works well, as the Physics Guide explains |

