JetBrains / JetBrains/resharper-unity

Custom annotations to enable Unity features

Open
#2,115 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.