File tree Expand file tree Collapse file tree
Plugins/AssetUsageDetector/Editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1642,10 +1642,6 @@ private VariableGetterHolder[] GetFilteredVariablesForType( Type type )
16421642 if ( field . FieldType . IsIgnoredUnityType ( ) )
16431643 continue ;
16441644
1645- // "ref struct"s can't be accessed via reflection
1646- if ( field . FieldType . IsByRefLike )
1647- continue ;
1648-
16491645 // Additional filtering for fields:
16501646 // 1- Ignore "m_RectTransform", "m_CanvasRenderer" and "m_Canvas" fields of Graphic components
16511647 string fieldName = field . Name ;
@@ -1668,10 +1664,6 @@ private VariableGetterHolder[] GetFilteredVariablesForType( Type type )
16681664 if ( property . PropertyType . IsIgnoredUnityType ( ) )
16691665 continue ;
16701666
1671- // "ref struct"s can't be accessed via reflection
1672- if ( property . PropertyType . IsByRefLike )
1673- continue ;
1674-
16751667 // Skip properties without a getter function
16761668 MethodInfo propertyGetter = property . GetGetMethod ( true ) ;
16771669 if ( propertyGetter == null )
Original file line number Diff line number Diff line change @@ -359,9 +359,9 @@ public static bool IsIgnoredUnityType( this Type type )
359359 if ( typeof ( Type ) . IsAssignableFrom ( type ) || type . Namespace == reflectionNamespace )
360360 return true ;
361361
362- // Searching pointers or ref variables for reference throws ArgumentException
363- if ( type . IsPointer || type . IsByRef )
364- return true ;
362+ // Searching pointers, ref variables or ref structs for reference throws ArgumentException
363+ if ( type . IsPointer || type . IsByRef || type . IsByRefLike )
364+ return true ;
365365
366366 return false ;
367367 }
You can’t perform that action at this time.
0 commit comments