@@ -25,9 +25,13 @@ internal static bool HasModifedProperties(this SerializedProperty property)
2525 internal static string GetPropertyHashKey ( this SerializedProperty property )
2626 {
2727 var hash = property . serializedObject . GetHashCode ( ) ;
28+ #if UNITY_2019_2_OR_NEWER
2829 return property . propertyType != SerializedPropertyType . ManagedReference
2930 ? $ "{ hash } .{ property . propertyPath } "
3031 : $ "{ hash } .{ property . propertyPath } .{ property . managedReferenceFieldTypename } ";
32+ #else
33+ return $ "{ hash } .{ property . propertyPath } ";
34+ #endif
3135 }
3236
3337 /// <summary>
@@ -36,9 +40,13 @@ internal static string GetPropertyHashKey(this SerializedProperty property)
3640 internal static string GetPropertyTypeKey ( this SerializedProperty property )
3741 {
3842 var type = property . serializedObject . targetObject . GetType ( ) ;
43+ #if UNITY_2019_2_OR_NEWER
3944 return property . propertyType != SerializedPropertyType . ManagedReference
4045 ? $ "{ type } .{ property . propertyPath } "
4146 : $ "{ type } .{ property . propertyPath } .{ property . managedReferenceFieldTypename } ";
47+ #else
48+ return $ "{ type } .{ property . propertyPath } ";
49+ #endif
4250 }
4351
4452 /// <summary>
@@ -296,6 +304,7 @@ public static FieldInfo GetFieldInfoFromProperty(SerializedProperty property, ou
296304 {
297305 foundField = currentType . GetField ( member , fieldFlags ) ;
298306 //NOTE: [SerializeReference] detected? If so we need to check dynamically cached type
307+ #if UNITY_2019_2_OR_NEWER
299308 if ( foundField == null )
300309 {
301310 var parent = property . GetParent ( ) ;
@@ -305,6 +314,7 @@ public static FieldInfo GetFieldInfoFromProperty(SerializedProperty property, ou
305314 foundField = parentType . GetField ( member , fieldFlags ) ;
306315 }
307316 }
317+ #endif
308318 }
309319
310320 if ( foundField == null )
0 commit comments