I made a Character selectiion and I used Unity Editor (to use Prefab utility), when I try to build the game it it says(int the error console) PrefabUtility doesn't exist in the current context(but it works in the game tab but not in the build).I searched on some docs and it said I needed to put my script in a folder called Editor I created this folder and when I tried to drag my script to the Gameobject(Skinmanager) it says the script is not an editor folder .So for the build works I need to remove the script from this folder and the build works (but the character selection doesn't work).Plz help!!!!!.
I'm having a hard time understanding the real problem here. But it's true that Unity editor functionality lives in another assembly and it's stripped out from the build completely.
In general, most of the editor scripts can be placed within the Editor folder. It doesn't matter where or how many of these folders you have, but they must be named exactly that.
However, often scripts combine game and editor logic. In this case, you can add UNITY_EDITOR macros that will strip out unwanted editor code from the script when you make a build.
#if UNITY_EDITOR
using UnityEditor;
#endif
// game code
#if UNITY_EDITOR
// editor code
#endif