mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-20 23:12:38 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 955972cc00 | |||
| ac55f29e7d |
@@ -1642,10 +1642,6 @@ namespace AssetUsageDetectorNamespace
|
|||||||
if( field.FieldType.IsIgnoredUnityType() )
|
if( field.FieldType.IsIgnoredUnityType() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// "ref struct"s can't be accessed via reflection
|
|
||||||
if( field.FieldType.IsByRefLike )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Additional filtering for fields:
|
// Additional filtering for fields:
|
||||||
// 1- Ignore "m_RectTransform", "m_CanvasRenderer" and "m_Canvas" fields of Graphic components
|
// 1- Ignore "m_RectTransform", "m_CanvasRenderer" and "m_Canvas" fields of Graphic components
|
||||||
string fieldName = field.Name;
|
string fieldName = field.Name;
|
||||||
@@ -1668,10 +1664,6 @@ namespace AssetUsageDetectorNamespace
|
|||||||
if( property.PropertyType.IsIgnoredUnityType() )
|
if( property.PropertyType.IsIgnoredUnityType() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// "ref struct"s can't be accessed via reflection
|
|
||||||
if( property.PropertyType.IsByRefLike )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// Skip properties without a getter function
|
// Skip properties without a getter function
|
||||||
MethodInfo propertyGetter = property.GetGetMethod( true );
|
MethodInfo propertyGetter = property.GetGetMethod( true );
|
||||||
if( propertyGetter == null )
|
if( propertyGetter == null )
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Unity.Collections;
|
using Unity.Collections;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.SceneManagement;
|
using UnityEditor.SceneManagement;
|
||||||
@@ -359,9 +360,13 @@ namespace AssetUsageDetectorNamespace
|
|||||||
if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace )
|
if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Searching pointers or ref variables for reference throws ArgumentException
|
// Searching Tasks for reference may freeze Unity since Task.Result freezes the active thread if Task hasn't completed yet
|
||||||
if( type.IsPointer || type.IsByRef )
|
if (typeof(Task).IsAssignableFrom(type))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Searching pointers, ref variables or ref structs for reference throws ArgumentException
|
||||||
|
if (type.IsPointer || type.IsByRef || type.IsByRefLike)
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
= Asset Usage Detector (v2.6.0) =
|
= Asset Usage Detector (v2.6.1) =
|
||||||
|
|
||||||
Documentation: https://github.com/yasirkula/UnityAssetUsageDetector
|
Documentation: https://github.com/yasirkula/UnityAssetUsageDetector
|
||||||
E-mail: yasirkula@gmail.com
|
E-mail: yasirkula@gmail.com
|
||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.yasirkula.assetusagedetector",
|
"name": "com.yasirkula.assetusagedetector",
|
||||||
"displayName": "Asset Usage Detector",
|
"displayName": "Asset Usage Detector",
|
||||||
"version": "2.6.0",
|
"version": "2.6.1",
|
||||||
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
||||||
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
||||||
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
||||||
|
|||||||
Reference in New Issue
Block a user