In Visual Studio, I see a line saying “UnityScript | 0 references” and “UnityMessage | 0 References” a couple times through out my code (snip included below), but I noticed the instructor does not have this message. Just wondering what it means and if I should address it somehow. Thank you in advance!!
Hi StarRider,
Which script editor do you use? Generally, as long as your code is working as expected, there is nothing to worry about. Some IDEs display various information which is not necessarily relevant for you.
That is part of something called “Code Lens” that is enabled in Visual Studio 2019 for windows and maybe other versions as well. That line will appear above methods in your code and let you see which methods you are actually referencing and which ones you are not. In VS, you can disable all of the Code Lens functionality within settings.
In VS Code/Codium, it comes default enabled with the C# extension by Microsoft, but you can choose to disable the reference code lens in the extension settings.
I personally use the line numbers column all the time as I navigate with my keyboard using the line numbers as opposed to with my mouse, so having those blank spots in the line number column drove me insane and I disabled that feature in both Codium and Visual Studio.
Hi Nina,
Thank you for the help! Helped clear things up for sure
Hello jonmarc,
Thanks for the in depth explanation!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.