JetBrains / JetBrains/resharper-unity
Add static analysis rule to detect SendMessage call with invalid method name
Open
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
Unity provides an API called [SendMessage](https://docs.unity3d.com/ScriptReference/GameObject.SendMessage.html) that allows invocation of a method by name.
There is no validation on whether the method even exists, and so it would make for an ideal candidate for static code analysis.
A nice validation would be to warn in case of usage of SendMessage with an invalid method name.
Contributor guide
Assessment
This issue has not been assessed yet.