Cannot access UnityEditor.EditorUtility class from a dll

I’m trying to move some code into a dll and in a few classes where UnityEditor.EditorUtility is referenced I’m getting this error:

Error CS0584: Internal compiler error: Method not found: ‘UnityEditor.EditorUtility.CompressTexture’. (CS0584)

Both UnityEditor.dll and UnityEngine.dll are added as references in MonoDevelop. Auto complete works fine for EditorUtility methods, but the compile step fails with the above error. I’ve found one reference to this on the forums here: http://forum.unity3d.com/threads/135691-Compile-Error-using-any-EditorUtility-function-in-a-dll but no solutions thus far :frowning:

Any ideas?

Hmm i guess the compiler has problems since all that functions are mapped to external functions that aren’t available as standalone library. They exists only in the editor. Which version of CompressTexture do you use? The one with TextureCompressionQuality or the int-version. The int-version is mapped externally and the TextureCompressionQuality version uses the int-version internally. I’m not sure if it makes a difference.

Never had such an issue, but it’s a while ago since i build an dll for Unity :wink: