Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.2K
Views
Unity: Application keeps running in background although Application.runInBackground is false

I'm currently developing some Unity project(this is my first one, I'm not familiar with Unity) and what bothers me is that breakpoints are still hitting when I minimize Unity editor window although I have Application.runInBackground == false so the app should be suspended while in background, but it is not ! Only the UI gets frozen and music stops while the actual code is continue executing. So, I'm basically wondering if this is general behaviour or this only happens when you're running in editor to allow debugging and in release builds code execution stops ?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I had similar issues. I found that it is because I have an IDE attached to Unity and only then did this happen. When you switch to release mode, everything go as it's supposed to - debug mode in Unity.

over 4 years ago · Santiago Trujillo Report

0

Did you try changing it in the editor? go to Edit -> Project Settings -> Player. The inspector pane will now change to show the player settings. Look for the option that says "Run In Background" and uncheck it. From what I understand Application.runInBackground == false more of pauses it than stops the script from running. If your project is for mobile(or maybe just add this anyway, it might help),try:

RuninBackgorund is ignored for Android and IOS how you can see here

The only and efficient way to run in background on Android is through a Service. You can use OnApplicationPause method to get notified when the game pauses/unpauses.

public void OnApplicationPause(bool paused) {
if(paused) {
// Game is paused, stop service notifications.
} else {
// Game is unpaused, start service to get notifications
}

Here you have a nice tutorial about communication between android and unity

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!