Renaming Variables/Properties?

In this lecture we rename some variables to pascal case, now getting referred to as properties.
I’m a bit lost as to if there is a difference here, Variable and property,… and why we go to pascal case.

Secondly, I’m not sure why for renaming in this lecture, the Rename tool isn’t used, as this automatically changes the used references to the same name, avoiding accidentally breaking the game, and also avoiding loosing the assignment in Godot.
I suppose it’s good to learn that manually renaming can bring these issues to resolve, but the rename tool option should be shown to, I’d have thought anyway.

So when changing from a regular variable to a property for example a public variable has no protections in place where as a property has get set methods involved allowing safety for the class involved. And the naming to pascal case is actually just the C# standard for public variables or properties. As for not using the rename tool, it’s pretty handy I agree. Renaming manually is something even I do to make sure nothing gets overlooked (the debugger will yell at me if I do XD)

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms