'CustomEditor' is not a attribute class

Hi there, I am on unity version 2017.1.0.f3 and for some reason an error that was not happening before, now occurs, and I didn’t even change the editor script nor the Graphic script, anyone knows what might be causing, the - ‘CustomEditor’ is not a attribute class - to trigger?

that occurs in the line where is says

[CustomEditor(typeof(Graphic))]

this is the beginning of that script:

#if UNITY_EDITOR

using UnityEngine;
using System.Collections;
using UnityEditor;

[CustomEditor(typeof(Graphic))]
public class GraphicEditor : Editor {

Any help would be appreciated :slight_smile:

You most likely created a class with the name “CustomEditor” which hides the class “UnityEditor.CustomEditor”.

The best and recommended solution is to rename your own class to something else. However if you want to keep that class you have to use the fully qualified name:

[UnityEditor.CustomEditor( typeof(Graphic) )]