예제 #1
0
        public static void GUI(EditorList info)
        {
            EditorGUI.indentLevel = info.level;

            info.isFold = EditorGUILayout.Foldout(info.isFold, info.arrayData.name);
            if (info.isFold == false)
            {
                return;
            }

            bool isChange = false;

            int size = info.arrayData.Count;

            InputTool.InputInt("Size", ref size, ref isChange);
            if (isChange)
            {
                info.arrayData.SetCount(size);
            }

            info.RefreshValue();

            for (int i = 0; i < size; i++)
            {
                EditorObject.GUI(info.editorElements[i]);
            }
        }
예제 #2
0
        public static void GUI(EditorObject info)
        {
            EditorGUI.indentLevel = info.level;

            if (info.editorList != null)
            {
                EditorList.GUI(info.editorList);
            }
            else if (info.editorArray != null)
            {
                EditorArray.GUI(info.editorArray);
            }
            else if (info.editorDictionary != null)
            {
                EditorDictionary.GUI(info.editorDictionary);
            }
            else if (info.editorClass != null)
            {
                EditorClass.GUI(info.editorClass);
            }
            else
            {
                object value = info.objectData.GetValue();

                bool isChange = false;

                InputTool.Input(info.objectData.type, info.name, ref value, ref isChange);

                if (isChange)
                {
                    info.objectData.SetValue(value);
                }
            }
        }