mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-19 14:32:37 +08:00
Removed a duplicate code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user