As a noob to C#, I just finished a beginner C# Udemy course.
I felt that calling something “text” seems confusing, since when we use “text.text” it’s confusing the object with the field (if that’s even the right terminology).
So I changed “public Text text” to “public Text myGameText” and changed the other occurrences accordingly (i.e. myGameText.text = “blah”)
Am I on the right track concerning best practices, or too obsessive?
The name of the variable is really just for organizational and debugging purposes and when you will need to go through the code to find logic problems. The variable name needs to be something relevant to the task being sought, so as not to spend to much time trying to remember what a variable is supposed to do.
likewise adding in //comments helps to jog memory and makes it easier for other coders to help debug or find logic problems.