66using System . Reflection ;
77using System . Linq ;
88using System . Text ;
9+ using UnityObject = UnityEngine . Object ;
910
1011namespace ScriptTester {
1112 enum PropertyType {
@@ -38,7 +39,7 @@ struct ComponentMethod {
3839 struct ComponentFields {
3940 public FieldInfo field ;
4041 public PropertyInfo property ;
41- public UnityEngine . Object target ;
42+ public UnityObject target ;
4243 }
4344
4445 interface IReflectorDrawer {
@@ -78,7 +79,7 @@ internal static void InitPropertyTypeMapper() {
7879 propertyTypeMapper . Add ( typeof ( Rect ) , PropertyType . Rect ) ;
7980 propertyTypeMapper . Add ( typeof ( Bounds ) , PropertyType . Bounds ) ;
8081 propertyTypeMapper . Add ( typeof ( AnimationCurve ) , PropertyType . Curve ) ;
81- propertyTypeMapper . Add ( typeof ( UnityEngine . Object ) , PropertyType . Object ) ;
82+ propertyTypeMapper . Add ( typeof ( UnityObject ) , PropertyType . Object ) ;
8283 propertyTypeMapper . Add ( typeof ( Array ) , PropertyType . Array ) ;
8384 }
8485
@@ -328,7 +329,7 @@ internal static string StringField(Rect position, string label, string value, bo
328329 return value ;
329330 }
330331
331- internal static UnityEngine . Object ObjectField ( string label , UnityEngine . Object value , Type objectType , bool allowScreenObjs , bool readOnly , params GUILayoutOption [ ] options ) {
332+ internal static UnityObject ObjectField ( string label , UnityObject value , Type objectType , bool allowScreenObjs , bool readOnly , params GUILayoutOption [ ] options ) {
332333 if ( ! readOnly )
333334 return EditorGUILayout . ObjectField ( label , value , objectType , allowScreenObjs , options ) ;
334335 EditorGUILayout . BeginHorizontal ( ) ;
@@ -341,7 +342,7 @@ internal static UnityEngine.Object ObjectField(string label, UnityEngine.Object
341342 return value ;
342343 }
343344
344- internal static UnityEngine . Object ObjectField ( Rect position , string label , UnityEngine . Object value , Type objectType , bool allowScreenObjs , bool readOnly ) {
345+ internal static UnityObject ObjectField ( Rect position , string label , UnityObject value , Type objectType , bool allowScreenObjs , bool readOnly ) {
345346 if ( ! readOnly )
346347 return EditorGUI . ObjectField ( position , label , value , objectType , allowScreenObjs ) ;
347348 EditorGUI . PrefixLabel ( ScaleRect ( position , widthScale : 0.5F ) , new GUIContent ( label ) ) ;
@@ -350,7 +351,7 @@ internal static UnityEngine.Object ObjectField(Rect position, string label, Unit
350351 return value ;
351352 }
352353
353- static void ClickObject ( UnityEngine . Object obj ) {
354+ static void ClickObject ( UnityObject obj ) {
354355 var newClickTime = EditorApplication . timeSinceStartup ;
355356 if ( newClickTime - clickTime < 0.3 && obj != null )
356357 Selection . activeObject = obj ;
@@ -429,7 +430,7 @@ internal static bool FetchValue(MemberInfo info, object target, out object value
429430 }
430431
431432 internal static int ObjIdOrHashCode ( object obj ) {
432- var unityObj = obj as UnityEngine . Object ;
433+ var unityObj = obj as UnityObject ;
433434 if ( unityObj != null )
434435 return unityObj . GetInstanceID ( ) ;
435436 if ( obj != null )
0 commit comments