JetBrains / JetBrains/resharper-unity
Custom annotations to enable Unity features
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice to recognise custom annotations so that user methods could get some of the coding assistance that Unity's own APIs get. For example, `SceneManager.LoadSceneAsync` will provide completion and validation on scene names, but a user method that wraps `LoadSceneAsync` cannot get this.
If the user could add a custom attribute to their method parameter, Rider/ReSharper could recognise this and provide scene name processing.
See [this forum post](https://rider-support.jetbrains.com/hc/en-us/community/posts/360010650039-String-suggestions-in-Unity?page=1#community_comment_360003212940).
Note that any annotation would need to be added to the project (perhaps delivered as a package?) before it could be recognised. It might be possible to simplify the existing method recognition by applying this attribute to Unity methods via external annotations. We should also look at what other features could use this - scene names, layers, input and so on.
Contributor guide
Assessment
This issue has not been assessed yet.