Hello,
We are working on an online multiplayer game in VR. We are using Playfab as gameservers and Mirror v30 for the Networking. It’s a 1v1 competitive game, we already had optimize the network overload and we have a stable latency, so the problem is not about the network itself but about the memory usage of the build.
For now, the server build consumes 260mb of memory (with the batchmode and nographics options). We are investigating about this high usage and we see that ShaderLab is taking ~10mb, and our DLLs ~210mb.
The problem about ShaderLab exists in another thread but there is no other answer than “report an issue” : Headless server
We must reduce the memory usage of the server build. It’s impossible to allocate 400mb for two players. Can anyone has tips, ideas or everything that would help us ?
Configuration
The project is setup for IL2CPP, with .NET 4.x and C++ compiler in Debug.
We are using Unity 2019.3.15f1 with thoses plugins and libraries :
- Sirenix OdinInspector :
- Demigiant DOTween
- Mirror
- PlayFabSDK
- Steamwork.NET & steam_api
This is our manifest.json :
{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.analytics": "3.3.5",
"com.unity.ide.vscode": "1.2.2",
"com.unity.inputsystem": "1.0.0",
"com.unity.mobile.android-logcat": "1.1.1",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.probuilder": "4.2.3",
"com.unity.progrids": "3.0.3-preview.6",
"com.unity.settings-manager": "1.0.2",
"com.unity.terrain-tools": "3.0.1-preview",
"com.unity.textmeshpro": "2.0.1",
"com.unity.timeline": "1.2.17",
"com.unity.ugui": "1.0.0",
"com.unity.xr.interaction.toolkit": "0.10.0-preview.7",
"com.unity.xr.legacyinputhelpers": "2.1.4",
"com.unity.xr.management": "3.2.15",
"com.unity.xr.oculus": "1.3.4",
"com.unity.modules.ai": "1.0.0",
"com.unity.modules.androidjni": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.cloth": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.imgui": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity.modules.screencapture": "1.0.0",
"com.unity.modules.terrain": "1.0.0",
"com.unity.modules.terrainphysics": "1.0.0",
"com.unity.modules.tilemap": "1.0.0",
"com.unity.modules.ui": "1.0.0",
"com.unity.modules.uielements": "1.0.0",
"com.unity.modules.umbra": "1.0.0",
"com.unity.modules.unityanalytics": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
"com.unity.modules.unitywebrequestaudio": "1.0.0",
"com.unity.modules.unitywebrequesttexture": "1.0.0",
"com.unity.modules.unitywebrequestwww": "1.0.0",
"com.unity.modules.vehicles": "1.0.0",
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
}
}