Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }