Suppress expensive method warnings for entire class

I would like to disable the “expensive method invocation” warning for Unity's Debug class.  I've tried adding // ReSharper disable Unity.PerformanceAnalysis to the Debug.Log method, but it has no effect.  How can I accomplish this?

0
3 comments
Could you try disabling `Settings | Languages & Frameworks | Unity Engine` -> `Enable performance analysis in frequently called code`?
Does it help?
0

That completely disables the feature.  I only want to disable it for methods in the Debug class.  It doesn't really make sense to have this warning appearing on debug methods in the first place.

0

Hi Sy

It is not possible right now. One can suppress warning e.g. for everything inside method/class. The closest feature to your scenario is to use Disable once with comment for each `Debug.Log` or `Debug.LogError` calls. 

Also, we have the following similar feature request for Unity plugin. It is close to your case, but not exactly the same. Please upvote/comment on it to show your interest or create a new one if you think this would be better. 

Have a great day! 

0

Please sign in to leave a comment.