Home > front end >  Unity Game performance when running 2 instances on same machine
Unity Game performance when running 2 instances on same machine

Time:10-27

I'm developing a Unity multiplayer game where a player can either be the host or the client.

While testing, I needed to run 2 instances on my development machine for the sake of testing and development. the 2 instances are either a build and the editor or 2 builds.

I'm working on a windows machine.

whichever build has windows focus, runs at 200 FPS. The other instance is very sluggish. This is not a problem with machine resources as the machine has 64 GB of RAM and an RTX 2080 GPU.

The strange thing that I have tried and worked is that if both instances are running and a third application has the focus (say notepad or task manager), both games run at around 120 FPS without any issues.

I thought to develop an application that takes focus from both of them and run transparent in the foreground but I felt that this is a very bad solution and there must be a good one out there.

Is there an option or a setting to cap performance per instance so the other can work normally? or an option that can force both instances to go out of focus without using a third app?

Sorry for the long question.

CodePudding user response:

Set Application.targetFrameRate to 60.

  • Related