マッピィ Techlog

日々思うこと

【Unity】The type or namespace name 'UnityEditor' could not be found エラー

ふとUnityでAndroidビルドをすると、こんなエラーが出ました。

The type or namespace name 'UnityEditor' could not be found

 

今回は意味もなく

using UnityEditor;

とあったので、削除で済みました。

 

本来であれば、関連ソースを

#if UNITY_EDITOR

でくくるか、Editorフォルダに配置すればいいみたいですね。