void OnGUI()
        {
            EditorGUILayout.ObjectField(instance as UnityEngine.Object, instance.GetType(), true);

            if (editorInstance == null)
            {
                editorInstance = new EditorInstance(instance);
            }

            scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            editorInstance.memberFilter = (MemberFilter)EditorGUILayout.EnumPopup("成员过滤", editorInstance.memberFilter);

            editorInstance.accessModifier = (AccessModifier)EditorGUILayout.EnumPopup("修饰符过滤", editorInstance.accessModifier);

            editorInstance.instanceType = (InstanceType)EditorGUILayout.EnumPopup("实例静态过滤", editorInstance.instanceType);

            editorInstance.isGet = EditorGUILayout.Toggle("Get", editorInstance.isGet);
            editorInstance.isSet = EditorGUILayout.Toggle("Set", editorInstance.isSet);

            editorInstance.searchKeyword = EditorGUILayout.TextField("搜索过滤", editorInstance.searchKeyword);

            EditorGUILayout.Space();
            EditorGUILayout.Space();

            EditorClass.GUI(editorInstance.info, editorInstance.searchKeyword.ToLower(), editorInstance.memberFilter, editorInstance.accessModifier, editorInstance.instanceType, editorInstance.isGet, editorInstance.isSet);

            EditorGUILayout.EndScrollView();
        }
Пример #2
0
        void Refresh()
        {
            if (target == null)
            {
                return;
            }

            if (instance == null)
            {
                instance = target as ReflectionMonoBehaviour;
            }

            if (editorInstance == null)
            {
                editorInstance = new EditorInstance(instance.target);
            }
        }