Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


isEditor

Whether the game is running inside the Unity Editor (Read Only).
Read time 1 minuteLast updated 5 days ago

Definition

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

Remarks

Returns true if the game is being run from the Unity Editor; false if run from any deployment target.

Examples

using UnityEngine;class Example : MonoBehaviour{ void Start() { if (Application.isEditor) { print("We are running this from inside of the editor!"); } }}