I have script for creating a custom drawer. Everything works fine in the editor and normal play, but when I try to build the project, I get this error and similar ones for UnityEditor derivatives in other scripts.
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(Conditions))]
public class ConditionDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
//Code for the GUI
}
}
This is one of the scripts’ methods and declarations. These scripts are put into a folder named “Drawers”.