Ejemplo n.º 1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUI.BeginProperty(position, label, property);
            position.height = EditorGUIUtility.singleLineHeight;
            EditorGUI.PropertyField(position, property, label, false);
            if (property.isExpanded)
            {
                var overrideData = EditorGUIUtils.FindSerializedPropertyData(property.FindPropertyRelative(k_OverrideName));
                var timeout      = EditorGUIUtils.FindSerializedPropertyData(property.FindPropertyRelative(k_TimeoutName));

                position.y += EditorGUIUtility.singleLineHeight;
                EditorGUIUtils.PropertyFieldInRect(position, overrideData, timeout);
                position.y += EditorGUIUtility.singleLineHeight;
                EditorGUI.PropertyField(position, property.FindPropertyRelative(k_IntervalName));
                position.y += EditorGUIUtility.singleLineHeight;
                EditorGUI.PropertyField(position, property.FindPropertyRelative(k_ReacquireName));
                position.y += EditorGUIUtility.singleLineHeight;

                DrawPriority(ref position, property);
            }

            EditorGUI.EndProperty();
        }