I got this error when I want to build, I used animatorcontroller in the code for animation.
I found Ineed to put the code I used unityEditor in editor folder. but when i move all of them in the editor code. they show many class or code missing and i cant even complie the game.
That means that theat piece of code is not needed in the build, you use it for developing the game so when its going to be build the code is not needed.
Im not talking about all the code, im talkin about the code in which you use UnityEditor.
UnityEditor library needs to be in the editor, not in the actual game.
Hey, please use Code Tags ( http://forum.unity3d.com/threads/using-code-tags-properly.143875/ )
The piece of code you provided does not present an issue, your error is in another place where you are using something of the Editor.
Could you provide the full script that generates the error?