jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

No refrence for AttributePropertyEditor #127

Closed mentaman closed 9 years ago

mentaman commented 9 years ago

Wrote this code

using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FullInspector;
using FullInspector.Internal;
using UnityEditor;
using UnityEngine;

[CustomAttributePropertyEditor(typeof(RangeAttribute), ReplaceOthers = false)]
public class RangeAttributeEditor<T> : AttributePropertyEditor<T, RangeAttribute>
{

    protected override T Edit(Rect region, GUIContent label, T element, RangeAttribute attribute, fiGraphMetadata metadata)
    {
        return element;
    }

    protected override float GetElementHeight(GUIContent label, T element, RangeAttribute attribute, fiGraphMetadata metadata)
    {
        return 100;
    }
}

and visual studio gets the reference and doesnt tell about any error. and then i go to unity and get this error

Assets/Src/EditorAttributes/RangeAttributeEditor.cs(12,44): error CS0246: 
The type or namespace name `AttributePropertyEditor`2' could not be found. 
Are you missing a using directive or an assembly reference?

Could it be because i'm still using a demo version?

jacobdufault commented 9 years ago

Is RangeAttributeEditor inside of an Editor folder?

mentaman commented 9 years ago

thanks. sorry for being such a newb >< it was the problem. and this attribute even exists in the full inspector.