Closed clantogw closed 2 years ago
This seems to be vsync related. Please check your vsync settings in the editor (in the Game View dropdown menu). Yes when the preview is in focus, the editor updates itself more often which can (in some version of Unity) show an increased frame rate in Unity. I think this is fixed in later versions of Unity. As for the performance, it sounds like you may be GPU limited in your application.
Describe the bug In my game, in Play Mode, Im getting 85fps in the Game Window. That is, if the "Live Preview" button is ticked and in focus on the live Live Camera script in the Inspector. If I click another object, or de-select the Live Preview checkbox, the fps goes to 55. My capture is a 30fps video. So initially I suspected the game is actually running at 55fps, and when the Live Preview is enabled, there is a bug that adds that video to the fps Stats, because the difference amounts to exactly 30 frames. However I can see in GPU-Z that my graphics card has a reduced load when Live Preview is enabled and in focus, and the second its not in focus the GPU load goes to 100%, corresponding with a drop in frame rate. My game is never intended to be built, and for now the workaround is to leave the Live Camera preview in focus. I am using two captures, one OBS-Cam, and one Decklink (Intensity Pro). Most curiously, when both instances of AV Pro Live Camera are completely disabled, the fps is still the low 55fps.
Your Setup (please complete the following information):