Getting unused on every function i create

So i have this issue that just appeared out of nowhere today. Every function i create in visual studio code gets squiggly blue lines under it with the message “is unused” even when i can clearly see it be used in unity. added a screenshot that sort of explains my problem.

i allso noticed that the blue lines dont appear when i set the function to public, but otherwise it will allways appear.
Anyone know how to fix this so that i dont get the blue line error code under every function i create?


In Visual Studio Code open the extensions panel and right click on the C# language support extension and select ‘Install Another Version’. You probably want V1.26.0.

I think you’re able to say “stop recommending this type of suggestion”, or “ignore this error”. It’s been awhile since I had those pop-up, so I’m pretty sure I made them stop in some way.

Ohh, that’s that other program, nevermind. I assumed that was Microsoft Visual Studio, yeah no clue on that one.

Yeah it’s the good one that watches its diet. Not that other big fat one.

Thank you, this fixed it for me. You are a lifesaver <3

In Visual Studio you just need to make sure you installed the Unity Tools in VS. (Tools->Get Tools and Features). If you installed VS with Unity, it should be installed already. Though if not you have to manually add it.

From a pure C# point of view having private methods that aren’t used anywhere inside the class are useless methods. The Unity Tools will take care of the custom Unity callbacks to not cause such warnings and also provides intellisense support for them.

VS code also has a “Unity” extension and there seems to be “Unity Tools” from a third party developer. Never used VS code for Unity so I can’t say much about it.