mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-19 14:32:37 +08:00
Material's color and mainTexture properties aren't searched at runtime since they're searched by SearchMaterial anyways and they can actually throw errors in the Console if the corresponding shader property doesn't exist
This commit is contained in:
@@ -1626,6 +1626,10 @@ namespace AssetUsageDetectorNamespace
|
||||
#endif
|
||||
typeof( Collider2D ).IsAssignableFrom( currType ) ) )
|
||||
continue;
|
||||
// Ignore certain Material properties that are already searched via SearchMaterial function (also, if a material doesn't have a _Color or _BaseColor
|
||||
// property and its "color" property is called, it logs an error to the console, so this rule helps avoid that scenario, as well)
|
||||
else if( ( propertyName == "color" || propertyName == "mainTexture" ) && typeof( Material ).IsAssignableFrom( currType ) )
|
||||
continue;
|
||||
// Ignore "parameters" property of Animator since it doesn't contain any useful data and logs a warning to the console when Animator is inactive
|
||||
else if( typeof( Animator ).IsAssignableFrom( currType ) && propertyName == "parameters" )
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user