예제 #1
0
        public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
        {
            if (!isEnabled)
            {
                // this shouldn't be here, but since CanCacheInspectorGUI is apparently not called
                // there is not currently way to call this just on enabled
                OnEnable(property);
            }
            foldoutRList = EditorGUI.Foldout(new Rect(rect.position, new Vector2(rect.size.x, space)), foldoutRList, label, true);
            if (KeysProperty == null)
            {
                DrawErrorMessage(rect, property.name.Length, KeyTypeErrorMessage);
            }
            else if (ValuesProperty == null)
            {
                DrawErrorMessage(rect, property.name.Length, ValueTypeErrorMessage);
            }
            else if (hasDuplicatedKey)
            {
                DrawErrorMessage(rect, property.name.Length, DuplicatedKeyErrorMessage);
            }

            if (foldoutRList && RList != null)
            {
                hasDuplicatedKey = false;
                rect.y          += space;
                RList.DoList(rect);
            }
        }
예제 #2
0
 public override void OnGUI(Rect rect, SerializedProperty property, GUIContent label)
 {
     foldoutRList = EditorGUI.Foldout(new Rect(rect.position, new Vector2(rect.size.x, space)), foldoutRList, label);
     if (showErrorMessage)
     {
         DrawErrorMessage(rect, property.name.Length, errorMessage);
     }
     if (foldoutRList && RList != null)
     {
         showErrorMessage = false;
         rect.y          += space;
         RList.DoList(rect);
     }
 }