/// <summary> /// To use with extreme caution. It not really get the property but try to find a field with similar name /// Hence inheritance override of property is not supported. /// Also variable rename will silently break the search. /// </summary> public static SerializedProperty Find <TSource, TValue>(this SerializedProperty obj, Expression <Func <TSource, TValue> > expr) { var path = CoreEditorUtils.FindProperty(expr); return(obj.FindPropertyRelative(path)); }
/// <summary> /// To use with extreme caution. It not really get the property but try to find a field with similar name /// Hence inheritance override of property is not supported. /// Also variable rename will silently break the search. /// </summary> public SerializedProperty Find <TValue>(Expression <Func <T, TValue> > expr) { string path = CoreEditorUtils.FindProperty(expr); return(obj.FindPropertyRelative(path)); }