Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Unity Game performance when running 2 instances on same machine

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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.

>Solution :

Set Application.targetFrameRate to 60.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading