Removed a duplicate code

This commit is contained in:
yasirkula
2026-03-19 13:54:11 +03:00
parent 8f8316266c
commit ac55f29e7d
2 changed files with 3 additions and 11 deletions
@@ -1642,10 +1642,6 @@ namespace AssetUsageDetectorNamespace
if( field.FieldType.IsIgnoredUnityType() )
continue;
// "ref struct"s can't be accessed via reflection
if( field.FieldType.IsByRefLike )
continue;
// Additional filtering for fields:
// 1- Ignore "m_RectTransform", "m_CanvasRenderer" and "m_Canvas" fields of Graphic components
string fieldName = field.Name;
@@ -1668,10 +1664,6 @@ namespace AssetUsageDetectorNamespace
if( property.PropertyType.IsIgnoredUnityType() )
continue;
// "ref struct"s can't be accessed via reflection
if( property.PropertyType.IsByRefLike )
continue;
// Skip properties without a getter function
MethodInfo propertyGetter = property.GetGetMethod( true );
if( propertyGetter == null )
@@ -359,9 +359,9 @@ namespace AssetUsageDetectorNamespace
if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace )
return true;
// Searching pointers or ref variables for reference throws ArgumentException
if( type.IsPointer || type.IsByRef )
return true;
// Searching pointers, ref variables or ref structs for reference throws ArgumentException
if (type.IsPointer || type.IsByRef || type.IsByRefLike)
return true;
return false;
}