Skip to content

Commit

Permalink
attempt to fix #1544, do not show for "Repeated property access of bu…
Browse files Browse the repository at this point in the history
…ilt in components is inefficient" for custom mono behaviours
  • Loading branch information
krasnotsvetov committed Nov 24, 2020
1 parent 644e41e commit 1abe057
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private static bool IsUnityComponentProperty(IReferenceExpression referenceExpre
if (containingType == null)
return false;

return containingType.IsBuiltInUnityClass() && containingType.DerivesFrom(KnownTypes.Component);
return containingType.IsBuiltInUnityClass() && !containingType.DerivesFromMonoBehaviour() && containingType.DerivesFrom(KnownTypes.Component);
}

private static bool IsReferenceExpressionOnly(IReferenceExpression referenceExpression)
Expand Down

0 comments on commit 1abe057

Please sign in to comment.