その先にあるもの…

Build error: The type or namespace name 'UnityEditor' could not be found. 본문

프로그래밍/Unity

Build error: The type or namespace name 'UnityEditor' could not be found.

specialJ 2015. 3. 26. 16:50

The UnityEditor namespace is not available in builds.

The easy solution is to put the script in a folder named Editor. Anything inside of folders named Editor is not included in builds. Since the entire script can be excluded you should do this.

Side note: When you want to exclude only part of a script you can enclose it in compiler flags.

  1. // Runtime code here
  2. #if UNITY_EDITOR
  3. // Editor specific code here
  4. #endif
  5. // Runtime code here
  6.  

Side note 2: Your ClearPlayerPrefs class should inherit from ScriptableObject since it shouldn't be attached to objects.


http://answers.unity3d.com/questions/576746/build-error-the-type-or-namespace-name-unityeditor.html

'프로그래밍 > Unity' 카테고리의 다른 글

ShaderLab: SubShader Tags { Queue }  (0) 2015.04.01
NGUI에 Fx 렌더링  (0) 2015.04.01
AnimatorStateInfo  (0) 2015.03.12
WorldToScreenPoint WorldToViewportPoint  (0) 2015.03.04
StartCoroutine  (0) 2015.03.03
Comments