game frame fixed time update.

How to coding game frame fixed time update such as follows

Time.deltaTime = 1.0f/30.0f;

Thank you.

The usual way is to use VSYNC either in the Quality settings, where “Every Vblank” means 60 FPS, and “Every second Vblank” = 30fps, or to enable it in external driver configuration software, such as the NVidia control panel or ATI Catalyst.

There is also the option to try to target a specific framerate which can be set with Application.targetFrameRate, though with this method you should beware that you are not guaranteed to hit it exactly for a number of reasons; read the linked docs.

You can use FixedUpdate().
It runs every 0.02s by default.
Otherwise you can use Coroutine like:

IEnumerator MyUpdate() {
  while (true) {
    //do something
    yield return new WaitForSeconds(0.5f); // specify the time you want here
  }
}

As pointed out by the other answers and comments there is no way to guarantee a fixed framerate. But you shouldn’t need one.

You should look at how you can make sure your clients are in sync. How to do that depends entirely on your game. You could send the whole game state each frame. You can send only state changes. You can make your game event based and just send the basic information and let the clients calculate the rest. It helps if you try to make your game as deterministic as possible(where needed).

Once you’ve figured that out you’ll have to work out if you’ll get problems with higher latency. At some point the user experience might suffer so you might need to interpolate data. Interpolation will help in reducing percieved lag up to a point. If you’re experiencing a very high latency then you might have to rethink your network architecture.

There are tons of articles on this topic and it isn’t something I would call easy. Unity provides some help with this but you might need to get more indepth. If you’re just starting out then I wouldn’t recommend starting with a multiplayer game.