Exemplo n.º 1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            Begin(position, property, label);

            var groupProperty = property.FindPropertyRelative("groups");
            var matchProperty = property.FindPropertyRelative("match");

            currentPosition = EditorGUI.PrefixLabel(currentPosition, property.ToGUIContent());

            BeginIndent(0);

            float width = currentPosition.width;
            currentPosition.width = width * 0.65f - 1f;
            currentPosition.height = EditorGUI.GetPropertyHeight(groupProperty, label);
            EditorGUI.PropertyField(currentPosition, groupProperty, GUIContent.none);
            currentPosition.x += currentPosition.width + 2f;
            currentPosition.width = width * 0.35f - 1f;
            EditorGUI.PropertyField(currentPosition, matchProperty, GUIContent.none);

            EndIndent();
            End();
        }