Version: Unity 7.0 Alpha (7000.0)
LanguageEnglish
  • C#

ApplicationInstallMode

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Installation mode of an application, such as a store installation or developer build.

Use Application.installMode to get the install mode of the running application. Unity determines this value at runtime. Use it to customize behavior for the distribution channel, such as enabling extra diagnostics for developer builds.

In the Unity Editor, Application.installMode always returns ApplicationInstallMode.Editor, including in Play mode. Platforms that report no installation information return ApplicationInstallMode.Unknown.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { switch (Application.installMode) { case ApplicationInstallMode.Editor: Debug.Log("Running inside the Unity Editor."); break; case ApplicationInstallMode.DeveloperBuild: Debug.Log("Installed from a development environment."); break; case ApplicationInstallMode.Store: Debug.Log("Installed from a store."); break; default: Debug.Log("Install mode: " + Application.installMode); break; } } }

Properties

Property Description
UnknownApplication install mode is unknown.
StoreApplication installed via online store.
DeveloperBuildApplication installed via developer build.
AdhocApplication installed via ad hoc distribution.
EnterpriseApplication installed via enterprise distribution.
EditorApplication is running in the Unity Editor.