Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


isBatchMode

Returns true when Unity is launched with the -batchmode flag from the command line (Read Only).
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static bool isBatchMode { get; }

Remarks

In batch mode, Unity runs from the command line without user interaction, typically used for automation (builds, tests, CI). For details, refer to EditorCommandLineArguments.

Examples

using UnityEngine;public class Example : MonoBehaviour{ void Start() { if (Application.isBatchMode) { Debug.Log("In BatchMode"); } }}