Should the Player be running when the application is in the background?
默认值为 false(应用程序在后台时将暂停)。
Android: Works only in cases if the application is unfocused, but visible. For example, when run in multi-window mode - Samsung Dex, Oculus Quest 2, ChromeOS, etc.
If the application is truly in background, the application pauses regardless of Application.runInBackground
option. If you want to execute tasks while in background, you need to implement background service.
Note: This property is ignored on iOS.
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Example() { Application.runInBackground = true; } }