Sprites assigned to Particle System's Texture Sheet Animation Module are now detected (#26)

Fixed Sprite within Particle System's Texture Sheet Animation not being detected

Authored-by: Nika Burimenko <remedy89@gmail.com>
This commit is contained in:
Nika Burimenko
2021-07-25 23:37:44 +10:00
committed by GitHub
parent 133b8b1227
commit c9131811e2
@@ -420,6 +420,16 @@ namespace AssetUsageDetectorNamespace
referenceNode.AddLinkTo( SearchObject( triggerModule.GetCollider( i ) ), "Trigger Module: Collider" );
}
catch { }
#if UNITY_2017_1_OR_NEWER
try
{
ParticleSystem.TextureSheetAnimationModule textureSheetAnimationModule = particleSystem.textureSheetAnimation;
for( int i = 0, j = textureSheetAnimationModule.spriteCount; i < j; i++ )
referenceNode.AddLinkTo( SearchObject( textureSheetAnimationModule.GetSprite( i ) ), "Texture Sheet Animation Module: Sprite" );
}
catch { }
#endif
}
else if( searchRenderers && component is Renderer )
{
@@ -1407,4 +1417,4 @@ namespace AssetUsageDetectorNamespace
}
}
}
}
}