Naming Convention


So as title suggested I found few mentioning in docs to naming convention mainly about GDScript is inspired by Python :

  • Classes PascalCase
  • variable, functions snake_case
  • CONSTANTS “ALL_CAPS” , pretty clean and neat inspired by Python and neat examples are included .






But how about Directories ?
Is it unwritten rule or some good convention exist for it to make it neat ? ( apart from addons - folder for Plugins )

1 Like

There’s literally a whole page on what to do in the docs.

As for file and folder names, I recommend adopting snake_case for all file and folder names, because otherwise you may run into export problems with Windows and Mac. While their are OS combinations that make this not an issue, I find it better to recommend it across the board. Because then the issues will never come up for you.

4 Likes

There is this page in the Docs, which also mentions the file naming conventions.

TL;DR - it’s snake_case

4 Likes

When in doubt - snake_case.

4 Likes