Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Application.runInBackground

マニュアルに切り替える
public static bool runInBackground;

説明

ゲーム画面がバックグラウンドでも実行されるべきかを設定します。

デフォルトは false です。(アプリケーションがバックグラウンドにある場合は一時停止します)

PlayerSettings.virtualRealitySupported が有効の場合、 VRDeviceType.None を除くすべての VR デバイスに対し、強制的に true (アプリケーションがバックグラウンドにある場合は実行されます) にされます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Example() { Application.runInBackground = true; } }