title: Attribute is not an attribute class
body: <p>I have the following three classes:</p>
  
  <p>SingletonDrawer.cs:</p>
  
  <pre><code>using UnityEngine;
  using UnityEditor;
  
  [CustomPropertyDrawer(typeof(SingletonAttribute))]
  public class SingletonDrawer : PropertyDrawer{
  
      public override void OnGUI(Rect position, SerializedProperty property, GUIContent label){
      }
  }
  </code></pre>
  
  <p>SingletonAttribute.cs:</p>
  
  <pre><code>using UnityEditor;
  
  #if UNITY_EDITOR
  [System.SerializableAttribute]
  public class SingletonAttribute : PropertyDrawer {
      public System.Type type;
      public SingletonAttribute(System.Type type){
          this.type = type;
      }
  }
  #endif
  </code></pre>
  
  <p>TimeTravel.cs:</p>
  
  <pre><code>using UnityEngine;
  
  namespace Simple.TimeTravel {
      [SingletonAttribute(typeof(TimeTravelController))]
      public abstract class TimeTravelController : MonoBehaviour {
  
      }
  
  }
  </code></pre>
  
  <p>In my <code>TimeTravel</code> Class, I am trying to add <code>SingletonAttribute</code> Attribute, but I am getting the following error:</p>
  
  <blockquote>
    <p>'SingletonAttribute' is not an attribute class [Assembly-CSharp] SingletonAttribute.SingletonAttribute(Type type)</p>
  </blockquote>
  
  <p>What is it that I can do to attach that attribute to a class? Similar to <code>AddComponentMenu</code>, <code>DisallowMultipleComponent</code>, etc...</p>
  
  <h2>Unity Example 1</h2>
  
  <p>Unity example of <code>DisallowMultipleComponent</code></p>
  
  <pre><code>[DisallowMultipleComponent]
  class MyClass : MonoBehaviour {}
  </code></pre>
  
  <p>When you try to add two components of the same type (<code>MyClass</code>) to the GameObject, a window opens saying you can not do that.</p>
  
  <h2>Unity Example 2</h2>
  
  <p>Unity example of <code>RequireComponent</code></p>
  
  <pre><code>[RequireComponent(typeof(Rigidbody))]
  class MyClass : MonoBehaviour {}
  </code></pre>
  
  <p>With this example when you add <code>MyClass</code> as a component to the GameObject unity will add the <code>Rigidbody</code> component if it isn't already on the GameObject.</p>
  
  <h2>What I want to achieve</h2>
  
  <p>What I want to do is create an Attribute called <code>Singleton</code> or <code>SingletonAttribute</code> and when the user adds the component with that attribute it will look at the game scene and not add the component if it is already within the scene.</p>
  
  <pre><code>[Singleton(typeof(MyClass))]
  class MyClass : MonoBehaviour {}
  </code></pre>