Version: 5.6
public static bool isEditor ;

説明

エディター上でプレイしているかを確認します(読み取り専用)

ゲームが Unity エディターで実行されている場合は true を返します。ターゲットにデプロイして実行した場合は false を返します。

using UnityEngine;
using System.Collections;

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