Application翻译:^牛^魔王
- absoluteURL
- backgroundLoadingPriority
- CancelQuit
- CanStreamedLevelBeLoaded
- CaptureScreenshot
- dataPath
- ExternalCall
- ExternalEval
- GetStreamProgressForLevel
- internetReachability
- isEditor
- isLoadingLevel
- isPlaying
- isWebPlayer
- levelCount
- loadedLevelName
- loadedLevel
- LoadLevelAdditiveAsync
- LoadLevelAdditive
- LoadLevelAsync
- LoadLevel
- LogCallback
- OpenURL
- persistentDataPath
- platform
- Quit
- RegisterLogCallbackThreaded
- RegisterLogCallback
- runInBackground
- srcValue
- streamedBytes
- systemLanguage
- targetFrameRate
- temporaryCachePath
- unityVersion
- webSecurityEnabled
Application.isEditor 是否编辑器
static var isEditor : bool
Description描述
Are we running inside the Unity editor? (Read Only)
是在Unity编辑器内运行?
Returns true if the game is being run from the Unity editor; false if run from any deployment target.
如果游戏从Unity编辑器中运行,返回真;如果从其他部署目标运行返回假。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
if (Application.isEditor)
print("We are running this from inside of the editor!");
}
}
if (Application.isEditor) {
print("We are running this from inside of the editor!");
}
最后修改:2010年12月14日 Tuesday 22:27