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.isPlaying 是否播放
static var isPlaying : bool
Description描述
Returns true when in any kind of player (Read Only).
当在任何种类的播放器时,返回真(只读)。
Returns true in the Unity editor when in play mode.
在Unity编辑器中,如果处于播放模式时返回真。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
public void Awake() {
if (Application.isPlaying)
print("In player or playmode");
}
}
if ( Application.isPlaying ) {
print("In player or playmode");
}
最后修改:2010年12月14日 Tuesday 22:24