JetBrains / JetBrains/resharper-unity

Add static analysis rule to detect SendMessage call with invalid method name

Open
#923 0 comments 0 reactions 1 assignee Claimed by @krasnotsvetov View on GitHub
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

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.