Now I don't know if I am missing anything, but after compiling a game I got the error Code (Error): "The type or namespace name `UnityEditor' could not be found. Are you missing a using directive or an assembly reference?"
Compiler strips UnityEditor. Use... Code (csharp): #if UNITY_EDITOR using UnityEditor; #endif ... Also need to do that for any editor code inside your runtime scripts.