Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by solarisx · Oct 19, 2017 at 02:08 PM · assetpluginbackground

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image solarisx · Oct 20, 2017 at 12:15 PM 0
Share

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

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

72 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

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


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges