public virtual bool OnInspectorNUI() { if (drawer == null) { drawer = new NUIDrawer(); } drawer.BeginEditor(serializedObject); if (!drawer.Header(serializedObject.targetObject.GetType().Name)) { drawer.EndEditor(); return(false); } return(true); }
public virtual bool OnNUI(Rect position, SerializedProperty property, GUIContent label) { if (drawer == null) { drawer = new NUIDrawer(); } drawer.BeginProperty(position, property, label); string name = property.FindPropertyRelative("name")?.stringValue; if (string.IsNullOrEmpty(name)) { name = property.displayName; } if (!drawer.Header(name)) { drawer.EndProperty(); return(false); } return(true); }