ドキュメント

Unity Engine

Unity Engine

isEditor

Whether the game is running inside the Unity Editor (Read Only).
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

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!"); } }}