Unity3d Tutorial: Application Class Part 3 - isEditor

Unity3D 2012. 6. 13. 14:19
반응형

http://file:///Applications/Unity/Documentation/ScriptReference/Application-isEditor.html


static var isEditor : boolean

Description

Are we running inside the Unity editor? (Read Only)

Returns true if the game is being run from the Unity editor; false if run from any deployment target.


실행되고 있는 편집 가능한 모드 인지 아닌지를 반환한다.


using UnityEngine;
using System.Collections;

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

}
}





반응형
: