mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-19 22:42:37 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a6b0f5ae92 | |||
| 8e7369e44e |
@@ -400,7 +400,11 @@ namespace AssetUsageDetectorNamespace
|
||||
try
|
||||
{
|
||||
ParticleSystem.CollisionModule collisionModule = particleSystem.collision;
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
for( int i = 0, j = collisionModule.planeCount; i < j; i++ )
|
||||
#else
|
||||
for( int i = 0, j = collisionModule.maxPlaneCount; i < j; i++ )
|
||||
#endif
|
||||
referenceNode.AddLinkTo( SearchObject( collisionModule.GetPlane( i ) ), "Collision Module: Plane" );
|
||||
}
|
||||
catch { }
|
||||
@@ -408,7 +412,11 @@ namespace AssetUsageDetectorNamespace
|
||||
try
|
||||
{
|
||||
ParticleSystem.TriggerModule triggerModule = particleSystem.trigger;
|
||||
#if UNITY_2020_2_OR_NEWER
|
||||
for( int i = 0, j = triggerModule.colliderCount; i < j; i++ )
|
||||
#else
|
||||
for( int i = 0, j = triggerModule.maxColliderCount; i < j; i++ )
|
||||
#endif
|
||||
referenceNode.AddLinkTo( SearchObject( triggerModule.GetCollider( i ) ), "Trigger Module: Collider" );
|
||||
}
|
||||
catch { }
|
||||
@@ -1021,26 +1029,38 @@ namespace AssetUsageDetectorNamespace
|
||||
SerializedProperty iteratorVisible = so.GetIterator();
|
||||
if( iterator.Next( true ) )
|
||||
{
|
||||
string assetPath = AssetDatabase.GetAssetPath( (Object) referenceNode.nodeObject );
|
||||
bool isProjectSettings = !string.IsNullOrEmpty( assetPath ) && assetPath.StartsWithFast( "ProjectSettings/" );
|
||||
|
||||
bool iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
bool enterChildren;
|
||||
do
|
||||
{
|
||||
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
||||
// properties don't have FieldInfos so we are skipping them, which is good because search results found in
|
||||
// those properties aren't interesting and mostly confusing)
|
||||
bool isVisible = iteratingVisible && SerializedProperty.EqualContents( iterator, iteratorVisible );
|
||||
if( isVisible )
|
||||
iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
if( isProjectSettings )
|
||||
{
|
||||
// Search Project Settings in full because for some reason, important settings like SRP asset
|
||||
// slot in Quality Settings aren't searched when iterating over only visible properties
|
||||
enterChildren = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Type propFieldType;
|
||||
isVisible = iterator.type == "Array" || fieldInfoGetter( iterator, out propFieldType ) != null;
|
||||
}
|
||||
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
||||
// properties don't have FieldInfos so we are skipping them, which is good because search results found in
|
||||
// those properties aren't interesting and mostly confusing)
|
||||
bool isVisible = iteratingVisible && SerializedProperty.EqualContents( iterator, iteratorVisible );
|
||||
if( isVisible )
|
||||
iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
else
|
||||
{
|
||||
Type propFieldType;
|
||||
isVisible = iterator.type == "Array" || fieldInfoGetter( iterator, out propFieldType ) != null;
|
||||
}
|
||||
|
||||
if( !isVisible )
|
||||
{
|
||||
enterChildren = false;
|
||||
continue;
|
||||
if( !isVisible )
|
||||
{
|
||||
enterChildren = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceNode searchResult;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "com.yasirkula.assetusagedetector",
|
||||
"displayName": "Asset Usage Detector",
|
||||
"version": "1.9.2",
|
||||
"version": "1.9.4",
|
||||
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
||||
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
||||
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
||||
|
||||
Reference in New Issue
Block a user