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;

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);

Last updated

Was this helpful?