- Home /
Update the Scene- or Game-View while in background
Hi, I have an plugin asset to control the position of GameObjects through an other application. The positions are set by receiving callbacks from a DLL.
To receive a callback, while the Unity game window is in background, I have to set
Application.runInBackground = true;
This works for a build game.
This works not in Editor play mode (hitting the play button in Editor). The callbacks are not proceeded. In a build game this blocking behavior can be achieved with setting Application.runInBackground=false;
Is there a C# setting to keep the Editor reactive while there is no mouse input or the Editor is in background?
I ask because this has worked without any settings until Unity 5.4 64bit. I have read the change-log and did not find any hint on that.
Thanks
Answer by Bunny83 · Oct 19, 2017 at 10:32 PM
Uhm setting runInBackground does work in the editor. Keep in mind that when your application requires this generally you can actually set runInBackground to true inside the player settings (Edit --> Project Settings --> Player --> Resolution and Presentation --> runInBackground). If this wouldn't work it would be impossible to test a network game in the editor as the editor has to keep running while in background / not focused.
I tried using the player settings too. Does not work. I am not using the Unity Network$$anonymous$$anager.
The funny thing is, if I grab the Unity Editor window at the title bar and resize it, the GameObjects get set to the latest positions from the dll. It seems the dll gets no resources to work until this window resize or the Unity GUI updates itself.
The second funny thing is, it works with all 32bit Unity versions without problems.
I know this behaviour form other game engines. $$anonymous$$ostly it is some kind of cpu saving functions. Are there some new performance/cpu save functions which can cause such a behaviour in Unity?
Your answer
![](https://koobas.hobune.stream/wayback/20220612141408im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
changing BLE connection priority when using Bluetooth LE for iOS, tvOS and Android asset 0 Answers
How to include assets in an android plugin (aar)? 3 Answers
I remember there is an asset to quick switch build target 1 Answer
Asset Store - "Try models in scene before purchase" plugin 0 Answers
An issue with the chronos plugin 0 Answers