示例#1
0
        public static void GUI(EditorClass info, string searchKeyword = "", MemberFilter memberFilter = MemberFilter.All, AccessModifier accessModifier = AccessModifier.All, InstanceType instanceType = InstanceType.Instance, bool isGet = false, bool isSet = false)
        {
            EditorGUI.indentLevel = info.level;

            if (info.level != -1)
            {
                info.isFold = EditorGUILayout.Foldout(info.isFold, info.name);
            }

            if (info.isFold)
            {
                if (memberFilter == MemberFilter.All || memberFilter == MemberFilter.Fields)
                {
                    for (int i = 0; i < info.editorFields.Count; i++)
                    {
                        EditorField editorField = info.editorFields[i];

                        EditorField.GUI(editorField, searchKeyword, accessModifier, instanceType);
                    }
                }

                if (memberFilter == MemberFilter.All || memberFilter == MemberFilter.Methods)
                {
                    for (int i = 0; i < info.editorMethods.Count; i++)
                    {
                        EditorMethod editorMethod = info.editorMethods[i];

                        EditorMethod.GUI(editorMethod, searchKeyword, accessModifier, instanceType, isGet, isSet);
                    }
                }
            }
        }
示例#2
0
        public void GetEditorField()
        {
            classInfo.GetField();

            for (int i = 0; i < classInfo.fields.Count; i++)
            {
                FieldData Field = classInfo.fields[i];

                EditorField editorField = new EditorField(Field, level + 1);

                editorFields.Add(editorField);
            }
        }
示例#3
0
        public static void GUI(EditorField info, string searchKeyword = "", AccessModifier accessModifier = AccessModifier.All, InstanceType instanceType = InstanceType.Instance)
        {
            //info.fieldData.RefreshValue();//重要 字段初始化有可能未空 没有引用
            if (accessModifier != AccessModifier.All && info.fieldData.accessModifier != accessModifier)
            {
                return;
            }

            if (instanceType != InstanceType.All && info.fieldData.instanceType != instanceType)
            {
                return;
            }

            if (searchKeyword != string.Empty && info.name.ToLower().Contains(searchKeyword) == false)
            {
                return;
            }



            EditorObject.GUI(info.editorObjectInfo);
        }