JetBrains / JetBrains/resharper-unity

'Repeated property access of built in component is inefficient' for Property setters is pointless

Open
#2,382 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/26871899/211050432-a5f0454d-11d7-4143-85fd-a189657dd0cd.png)
In this context there is no point in showing this warning, due to how Unity handles CharacterControllers (and NavMeshAgents) positions they need to be disabled before changing their position and then re-enabled afterwards meaning this is perfectly valid code but Rider assumes some inefficiency here.

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reproducing the warning in Rider with Unity CharacterControllers or NavMeshAgents whose positions are changed while disabled, then locate the inspection responsible for repeated built-in component property access. Done means the warning is no longer shown for these valid property-setter patterns.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.