static var runInBackground : bool
Description描述
Should the player be running when the application is in the background?
应用程序在后台时是否应该被运行?
Default is false (application pauses when it is in background).
默认为假(当程序在后台时暂停)
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
Application.runInBackground = true;
}
}
// Make the game run even when in background
// 让游戏在后台时也运行
Application.runInBackground = true;