- Home /
Question by
Wokarol · Jun 18, 2018 at 07:44 PM ·
c#editoreditor-scriptinggenericsproperty drawer
Custom property drawer for generic
So I made some things based on "ScriptableObject as variable holder" concept and I needed property drawer for every class that inherits from GenericVariableReference<T, VarT>
but I can't do [CustomPropertyDrawer(typeof(GenericVariableReference))]
and because of that I have class that looks like this:
using UnityEditor;
namespace Wokarol {
[CustomPropertyDrawer(typeof(FloatVariableReference))]
[CustomPropertyDrawer(typeof(StringVariableReference))]
public class ReferenceDrawer : GenericReferenceDrawer { }
}
It looks like most pointless thing ever
Comment