Simulation frequency

If we don't do any special configuration, entity data is captured at the highest possible frequency and sent to the replication server. This often generates more data than is needed to efficiently replicate the entity's state across the network.

Global simulator frequency

On a simulator, we can limit the framerate globally using Unity's built-in static variable targetFrameRate.

Application.targetFrameRate = 10;

coherence will automatically limit the target framerate of uploaded simulators to 30 frames per second. We plan to enable lifting this restriction in the future. Check back for updates in the next couple of releases.

Per-component frequency limitation

Sample rate can also be configured individually for all fields with code.

// Set position sample rate to 10hz
GetComponent<CoherenceSync>().SetSamplingFrequency<WorldPosition>(10);

// Set rotation sample rate to 20hz
GetComponent<CoherenceSync>().SetSamplingFrequency<WorldOrientation>(20);

In the future, you will be able to define per-field sample frequencies in the Optimization window.

Last updated