///Begin GUI public object DrawGUI(IObjectDrawer objectDrawer, GUIContent content, object instance, FieldInfo fieldInfo, object context, DrawerAttribute attribute) { this.objectDrawer = objectDrawer; this.content = content; this.instance = instance; this.fieldInfo = fieldInfo; this.context = context; this.attribute = (T)attribute; return(OnGUI(content, instance)); }
///Return an attribute drawer instance of target attribute instance public static IAttributeDrawer GetAttributeDrawer(DrawerAttribute att) { return(GetAttributeDrawer(att.GetType())); }
///Begin GUI object IAttributeDrawer.DrawGUI(IObjectDrawer objectDrawer, GUIContent content, object instance, DrawerAttribute attribute, InspectedFieldInfo info) { this.objectDrawer = objectDrawer; this.content = content; this.instance = instance; this.attribute = (T)attribute; this.info = info; var result = OnGUI(content, instance); //flush references this.info = default(InspectedFieldInfo); this.content = null; this.instance = null; this.attribute = null; this.objectDrawer = null; return(result); }