- Home /
Question by
sakisspahos · Aug 03, 2017 at 08:56 AM ·
error message
Games runs perfectly on editor but error on build
Games runs without any problems in the editor, but when im about to build it this error pops.
xxx.png
(21.1 kB)
Comment
Answer by J_LTD · Aug 03, 2017 at 09:02 AM
You should not use UnityEditor in a build. You can use
#if UNITY_EDITOR
#endif
to surround code that should only be used in the editor (a.k.a. usage of the UnityEditor namespace)