Beispiel #1
0
            void DrawPlatformsElement(Rect rect, int index, bool isActive, bool isFocused)
            {
                SerializedProperty name   = platformsList.main.GetPropertyOfIndex(index, "name");
                SerializedProperty module = platformsList.main.GetPropertyOfIndex(index, "module");

                GUIArea.ProgressLayout(ref rect);

                name.stringValue = EditorGUI.TextField(GUIArea.ProgressLine(ref rect), "Name", name.stringValue);

                module.objectReferenceValue = EditorGUI.ObjectField(GUIArea.ProgressLine(ref rect), platformsList.main.serializedProperty.displayName, module.objectReferenceValue, target.ModuleType, false);
            }
Beispiel #2
0
        protected virtual void DrawDefaultMultiElements(Rect rect, int index, bool isActive, bool isFocused)
        {
            List <SerializedProperty> childern = GetArrayElement(index).GetChildern();

            if (childern.Count == 1)
            {
                DrawDefaultSingleElements(rect, index, isActive, isFocused, childern[0]);

                return;
            }

            Rect childRect;

            for (int i = 0; i < childern.Count; i++)
            {
                childRect = GUIArea.ProgressLayout(ref rect, EditorGUI.GetPropertyHeight(childern[i], true));
                EditorGUI.PropertyField(childRect, childern[i]);
            }
        }