File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 1
1
using UnityEngine ;
2
2
using UnityEditor ;
3
3
using System . Collections . Generic ;
4
- using System . IO ;
5
4
using UnityEditorInternal ;
6
5
using System ;
7
6
using System . Reflection ;
@@ -78,32 +77,17 @@ void SetupProps()
78
77
props . Props . Clear ( ) ;
79
78
Type type = src . GetType ( ) ;
80
79
if ( Quirks . ContainsKey ( type ) )
81
- {
82
80
foreach ( string key in Quirks [ type ] . Keys )
83
- {
84
81
props . Props . Add ( new PropertyEntry ( key ) ) ;
85
- }
86
- }
87
82
88
83
propsScript . Props . Clear ( ) ;
89
84
foreach ( PropertyInfo f in src . GetType ( ) . GetProperties ( ) )
90
- {
91
- SerializedObject s = new SerializedObject ( src ) ;
92
- SerializedProperty p = s . FindProperty ( f . Name ) ;
93
-
94
85
if ( f . CanWrite && f . CanRead )
95
86
propsScript . Props . Add ( new PropertyEntry ( f . Name ) ) ;
96
- }
97
87
98
88
propsScriptFields . Props . Clear ( ) ;
99
89
foreach ( FieldInfo f in src . GetType ( ) . GetFields ( ) )
100
- {
101
- SerializedObject s = new SerializedObject ( src ) ;
102
- SerializedProperty p = s . FindProperty ( f . Name ) ;
103
-
104
- if ( true )
105
- propsScriptFields . Props . Add ( new PropertyEntry ( f . Name ) ) ;
106
- }
90
+ propsScriptFields . Props . Add ( new PropertyEntry ( f . Name ) ) ;
107
91
108
92
props . Visible = true ;
109
93
propsScript . Visible = true ;
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ void OnGUI()
43
43
{
44
44
GUILayout . Label ( Path . GetFileNameWithoutExtension ( materials [ i ] ) ) ;
45
45
GUILayout . FlexibleSpace ( ) ;
46
- //if (GUILayout.Button("Show"))
47
- // EditorGUIUtility.PingObject(AssetDatabase.LoadAssetAtPath(materials[i], typeof(Material)));
46
+
48
47
if ( GUILayout . Button ( "Select" ) )
49
48
Selection . activeObject = AssetDatabase . LoadAssetAtPath ( materials [ i ] , typeof ( Material ) ) ;
50
49
}
You can’t perform that action at this time.
0 commit comments