Exemplo n.º 1
0
        void DrawLevelListElement(Rect rect, int index, bool isActive, bool isFocused)
        {
            SerializedProperty element = levels.GetArrayElementAtIndex(index);

            rect.y     += VerticalMargin;
            rect.height = SceneInfoDrawer.GetHeight(false);
            EditorGUI.PropertyField(rect, element, GUIContent.none);
        }
Exemplo n.º 2
0
        public void OnEnable()
        {
            // Grab all serialized properties
            loadLevelAsynchronously = serializedObject.FindProperty("loadLevelAsynchronously");
            soundEffect             = serializedObject.FindProperty("soundEffect");
            splash   = serializedObject.FindProperty("splash");
            mainMenu = serializedObject.FindProperty("mainMenu");
            credits  = serializedObject.FindProperty("credits");
            levels   = serializedObject.FindProperty("levels");

            // Setup level list
            levelList = new ReorderableList(serializedObject, levels, true, true, true, true);
            levelList.drawHeaderCallback  = DrawLevelListHeader;
            levelList.drawElementCallback = DrawLevelListElement;
            levelList.elementHeight       = SceneInfoDrawer.GetHeight(false) + VerticalMargin;
        }