JetBrains / JetBrains/resharper-unity

Handle incorrect event handlers

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

Description

Unity will only list public instance methods and property setters as event handlers. If an event handler is added and then subsequently set to `internal` or `static`, then the handler won't work correctly at run time (this needs confirmation, also needs confirming that the saved data isn't lost).

Rider should:
* Warn that the handler has incorrect access or static modifiers
* Warn if the parameters of the method don't match the parameters in the usage

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.