Description
The NetworkFrequency
property of the Scene
class represents the frequency at which network updates occur. This property is of type System.Single
, indicating it holds a floating-point value. However, it is marked as obsolete, meaning it is no longer recommended for use in new code. Instead, the network update rate should be configured using ProjectSettings.Networking.UpdateRate
.
Usage
Since NetworkFrequency
is obsolete, it is advised to use ProjectSettings.Networking.UpdateRate
for setting or retrieving the network update rate. This ensures that your code remains up-to-date with the latest API changes and best practices.
Example
// Example of accessing the obsolete NetworkFrequency property
// Note: This is not recommended as the property is obsolete.
float frequency = myScene.NetworkFrequency;
// Recommended approach
float updateRate = ProjectSettings.Networking.UpdateRate;