DOTSNET
  • Documentation
  • Overview
    • Installation
    • Recommended Reading
    • Platforms
    • Changelog
  • Examples
    • Benchmark
    • Chat
    • Pong
    • Physics
  • User Manual
    • Migrating from Mirror
    • Authoring
    • Server & Client Worlds
    • Selective System Authoring
    • Dependency Injection
    • NetworkMessage
    • NetworkServerSystem
    • NetworkClientSystem
    • NetworkIdentity
    • NetworkComponent
    • PrefabSystem
    • NetworkReader/Writer
    • Bitpacking
    • Authentication
    • Interest Management
    • Transports
    • Networking & Burst
    • Networking & Jobs
    • Compression
    • Utilities & Extensions
    • Unity.Physics Support
    • Hybrid Renderer V2 / URP
    • Benchmarks
Powered by GitBook
On this page
  1. User Manual

Networking & Burst

While Jobs aren’t always a good idea, Burst compiling main thread code is always a good idea.

Burst allows for tremendous performance improvements, usually at least by an order of magnitude. It can make the difference between 10k and 100k entities.

Important: you can not call NetworkServerSystem.Send(Message) from Burst. Instead, use a NativeMultiMap<connectionId, NetworkMessage> as a buffer, add your messages from within the Burst ForEach call, and then call NetworkServerSystem.Send(NativeMultiMap) afterwards.

Even though we have the additional buffer step, the code still runs at least an order of magnitude faster thanks to Burst.

When starting out, don’t worry too much about Burst.

PreviousTransportsNextNetworking & Jobs

Last updated 4 years ago