JetBrains / JetBrains/resharper-unity
Allow "introduce field and initialise in Start/Awake" context action outside of performance critical context
Open
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
There is currently a context action for usages of `GetComponent` inside a performance critical context that will introduce a field and initialise it in `Start` or `Awake`. This action isn't available outside of performance critical context methods, which makes it harder to introduce a field and move the initialisation. We should extend availability to any component.
Ideally, this should also be integrated with the Extract Field refactoring, but that requires changes to the platform. See [RIDER-75534](https://youtrack.jetbrains.com/issue/RIDER-75534)
Contributor guide
Assessment
This issue has not been assessed yet.