unity-game-engineunity3d-unet

How to use Unity MLAPI to do high frequency broadcasting?


My Unity project is using MLAPI framework(UNet Transport). I have a server and 3 clients. Server needs to send RPC message to all clients every frame. The data flow is about 2KB/frame for each client. My project is running at 60FPS. The delivery and sequence of messages are not necessary.

However, server will pop up some warnings like "no free events for message" when running and then all connected clients disconnect automatically. Maybe the problem is broadcast frequency is too high and the message is too big. But I really need these.

Is there any suggestion about NetworkConfig settings? Any suggestion is appreciated.

Thanks a lot!

update: My project is working with a motion capture system and only the server can receive the motion data. So Server needs to broadcast it to other clients.That's why I need to do it every frame.


Solution

  • I tried different settings of NetworkConfig, especially the MaxReceiveEventsPerTickRate and it just works fine now.