'Unity C# ( warning CS8321: The local function 'OnTriggerEnter2D' is declared but never used )
I'm facing this warning, I tried everything, but I could not reach the result. Could you help ( warning CS8321: The local function 'OnTriggerEnter2D' is declared but never used )
Solution 1:[1]
This literally just means what it says: the method (seemingly a method for an event) is never used. Simply put, you've declared a method but you haven't used it anywhere (yet).
This means that this method is quite literally, useless. (that's what it's warning you about)
You can solve this in 3 ways, either use the method somewhere (like adding it to the desired event or just calling it) or just remove the method entirely. Lastly you can surpress the warning in your IDE if you have to have that method.
To do this, depending on your IDE, simply right click the warning, and click "surpress warning".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
